Floats in IE6

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have this site (http://solutions-linux.org /) for which I have 3 DIVs
with absolute widths floating against each other. It renders fine
under IE7, Firefox, Opera and Safari, but the rightmost DIV collapses
on IE6.

I read that this is due to the fact that IE6 adds margins to DIVs or
something, but not sure really. I had this problem on an other site,
but was in too much of an hurry and just reduced to width of the one
containing the text so the 3 DIVs have a place for sure against each
other. But for this site, I would like to fix the problem for real
since the text column is already narrow enough. Do you people know
which CSS property do IE6 gives to DIVs? What to I have to change to
fix that?

It's hard to try things out since I'm on Linux and I don't have IE6
handy to test it out.

Thanks in advance.

Re: Floats in IE6

sebzzz@gmail.com wrote:

Quoted text here. Click to load it

Caused by the 50% left margin on the a.lien-nouvelles.

Quoted text here. Click to load it

Instead of using a 50% left margin, float it right, and then give it
the right padding in pixels that you want.
Then set clear:both on the hr below it.

Alternatively, wrap the a element in a p, and set text-align:right on
that paragraph.

The next problem is the hr itself: you want it to be centered, but IE6
shows it left aligned. This is because of the text-align:left on the
#content, the parent of #nouvelles.

Wrap it in a div with text-align:center, or set text-align:center on
the div#nouvelles, and then set text-align:left on the paragraphs and

Els                     http://locusmeus.com /

Re: Floats in IE6

Thanks a lot for this!

Quoted text here. Click to load it

Site Timeline