SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: label width?

  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    label width?

    in my form http://www.scasp.com/testing/reviewform.php the fielset near the top with 2 column is the one im concerned about.
    I said in my css that labels are to have a with of 150 each, why is it not showing?
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    Non-Member lostseed's Avatar
    Join Date
    Sep 2005
    Location
    Zurconion Soon!
    Posts
    1,549
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ** might as well paste your label code to save us time from digging through

    forgot where i was haha

  3. #3
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    here
    HTML Code:
    label { color: #999;
    width: 150px; border-color: RED;
    text-align: left;
    font: 10px bold Tahoma, Verdana, Arial, Sans-serif;}
    Thanks
    "Oh, and Jenkins--apparently your mother died this morning."

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Labels are inline elements generating inline boxes. Dimensions are ignored for inline boxes.

    You need to make the labels generate block boxes, e.g., by floating the labels.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    You need to make the labels generate block boxes, e.g., by floating the labels.
    Or make them display: block.

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    Or make them display: block.
    That will move the subsequent form field to the next line, which I assume is not the desired behaviour for someone who wants to set a width on the label.

    display:inline-block might be useful, but browser support for that is iffy.
    Birnam wood is come to Dunsinane

  7. #7
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You were right, I just floated them and they worked gread. take a look (please) and let me know if you approve?
    Thanks
    "Oh, and Jenkins--apparently your mother died this morning."


Bookmarks

Posting Permissions

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