Jul
2

IE6 list items not floating

By Sam  //  IE Problems  //  No Comments

Today I encountered an issue with a menu that was based on an unordered list (UL) where all of my floated list items were displaying 100% wide and then dropping a line. They should have been sitting next to each other, with each LI the size of the text it contained.

My code was:


#header ul{
float:left;
width:740px;
height:26px;
list-style-type:none;
}
#header ul li{
float:left;
height:26px;
}
#header ul li a{
display:block;
height:26px;
}

I use this structure all the time and so was surprised that today it had decided not to work. After fiddling with it for a while I made my anchor float and suddenly everything started working :-) .


#header ul li a{
float:left;
display:block;
height:26px;
}

Leave a comment

Sponsored links