SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    788
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    floating elems: MUST have width set?

    I have a bunch of floated <ul>'s... I find if I add width the layout gets kind of messed up..........;-)
    (not really messed up, just not what I want.. I would have to set diff widths for diff <ul>'s if I set widths... right now they're just the width of the widest <li>... which are all just one-liners...)

    (there are "dividers" betw them (1px-wide divs w/left & right margins that act as vertical "lines" betw the <ul>'s... maybe you don't need width for the <ul>'s if they have these block elems in between them?)


    asking b/c my understanding is CSS specs says you have to set width for floated elems (although w/o widths set they work fine in FF, IE, Chrome..)

    thank you...

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,619
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I think they said set width becaus of ie6 maybe 7. But those are gone now. If you float without a width it will just shrink wrap the text. If that's what you want it's fine then.

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    788
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    awesome....... thanks.....

  4. #4
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,619
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Keep in mind though that if text size is increased so to will your floated div.


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
  •