Forum Moderators: not2easy

Message Too Old, No Replies

Floats of different widths - text does not clear in Firefox et al

What is going on here? Works in MSIE

         

badbadmonkey

9:42 am on Feb 9, 2010 (gmt 0)

10+ Year Member



I have a series of floated elements down the right side of a simple page. Two of them are 300px then there are some pics which are 330px wide.

These elements are set to float:right obviously and each drops below its predecessor with clear:right. The widths are set explicitly.

So these divs are followed by <p>s which are intended to flow around the floats. Works fine for the most part, but in Firefox, Chrome, et al the <p> of text which happens along at the point where the first 330px pic appears acts only as if it needs to clear the preceding 300px element! - the lower part of the paragraph disappears under the wider pic.

In MSIE it flows as expected.

This is very simple CSS and I'm surprised to see the issue. Any idea what is going on?

limbo

10:15 am on Feb 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi badbadmonkey

Could you supply a little snippet of CSS and HTML?

It's tricky to diagnose without seeing the css you have now. Could be a simple case of floating everything, or changing your clear properties.