dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: fixed width and height

  1. #1
    Join Date
    Feb 2005
    Location
    Belgium
    Posts
    79

    fixed width and height

    I'm reading text from a DB into a label.
    But I don't want the label to adjust itself to the length of the text. I want the label to remain 190 x 150
    I have: <asp:label id=lblText1 Width="190" CssClass="tekst" Runat="server" BorderWidth="1px" BorderColor="#FC9107" Height="150">hier komt tekst</asp:Label>

    But it still adjust to the text. Where can I say that it has to stay fixed?

    thx

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Label outputs a span which is an inline element. You should put this in the tag
    style="display:block; height:150; width:190;". But what if the text is too big? This is just going to pop out of the span if you have text that is too big so make sure the text is sorter or just right.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles