I am attempting to create a 2-column layout using floated elements:
<ul>
<li class="odd">Content for the left column</li>
<li class="even">Content for the right column</li>
<li class="odd">Additional content for the left column</li>
<li class="even">Additional content for the right column</li>
<li class="odd">More content for the left column</li>
<li class="even">More content for the right column</li>
</ul>
CSS:
ul {
margin: 20px 0px;
width: 880px;
}
li {
position: relative;
float: left;
width: 410px;
margin: 0px 0px 10px 0px;
padding: 0;
}
.odd { clear: left; }
.even {
clear: right;
margin-left: 50px;
}
While this setup works well, I have encountered an issue with Internet Explorer 6 where the even
elements do not clear and end up horizontally stacked on the first row. How can I resolve this problem?