SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE not liking overflow: hidden to sort contained floats

    Hi all, I often use overflow: hidden to make a container fit to its contents when the contents are floated and I don't want to float the container. I've noticed that this often doesn't work in IE can anyone tell me why and maybe offer an alternative?

    Thanks

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,484
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Yes IE6 doesn't understand this part of the specs

    However IE6 will contain floats when the element in question has "layout" so you simply need to ensure the element has a dimension (if possible) or use the * html #elementname {height:1&#37 fix when you don't want a set dimension.

    I notice that you already have a clearing mechanism built into your page and you simple need to add the clearfix class to the parent container. See the FAQ on floats for more info.

  3. #3
    SitePoint Addict
    Join Date
    May 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks Paul


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
  •