The code I gave you originally had the same effect I have it working locally right in front of me in IE8 and Firefox.
If I clear the floats, the elements will stay like this:
A
B
C
But I want then to be like this:
A
B C
No?
That’s why I have tried to clear the second element so that it could get out of the normal flow.
I’m getting them like this, that C should be side by side with B.
AC
B
I removed the float from the first element only so that B started on the next line and then following on the same line by C because they were both floated.
Ok, given this 3 lis, I do have the clear applied to the middle one.
The first and the second stays alongside but the third (and despite the place that it seems to have, seems to prefer to say one bottom line). :s
If I clear the floats, the elements will stay like this:
A
B
C
But I want then to be like this:
A
B C
No?
That’s why I have tried to clear the second element so that it could get out of the normal flow.
I’m getting them like this, that C should be side by side with B.
AC
B
I believe I’ve tried that, but with no luck.
But, let me think, how can I not float the first item:
If I float the container, and at the first item inside that container, I apply a clear property would that do the trick?
Or, if I float all other elements, and the first I apply float:none; ?
I have:
a) corrected the markup.
b) contain the floats with overflow property applied on the ul.
c) give a explicit width to the ul so that, the out of the flow
element could not go more upper then what it should.
In IE when you have a sequence of floats you can’t just add clear to one float because the following floats will still stack alongside the original element.
You would have to have an element that clears the floats above completely and is 100% wide so that no more floats rise up (or is non floated and cleared.).
The simplest solution with the code you have shown is not to float the first item.