Treehouse: Grow your CSS skills. Land your dream job.

Why dose IE clear the floats?

  • # December 4, 2009 at 1:43 am

    Hi, i want all this divs to be floated right on one singel row, it workes fine in FF and Chrome but IE seames to flear the floates and the all end up over eachother. Is this IE querk or am i just thning wrong, and how do i fix it?





    # December 4, 2009 at 1:52 am

    If I remember correctly:

    In general when you float a div, the width goes from 100% to as small as possible (auto?)… but not in IE. It stays at 100%. I’ve had to assign a width to the Div as well…

    Hope that helps.

    # December 4, 2009 at 6:58 am

    oki that would probably work, but i really would like to be able to not give every box an different id :/ is there a way around it?


    # December 4, 2009 at 1:42 pm

    You don’t have to give each box its own id, you already have classes on them. Just apply the width to the classes.

    # December 4, 2009 at 1:49 pm

    yes my bad, i meant that i don’t wont to another class ether , i want to box to be generic so i dont need a special class depeidin on the length of the networks name :/

    # December 4, 2009 at 2:34 pm

    You can try "width:auto" , but I don’t think that will work…

    It might be best to do a "display:inline" instead of doing float: left…

    # December 4, 2009 at 2:54 pm

    Thanks, will do, but i really must say, i hate IE :D

    # December 4, 2009 at 3:00 pm

    Then you are a real web developer ;)

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.