Forum Moderators: not2easy

Message Too Old, No Replies

How to stop a DIV's contents from pushing the DIV below others

if its floated?

         

hound_dog

11:44 am on Nov 2, 2004 (gmt 0)

10+ Year Member



I have a master div set at a width of 50%. Inside it are three other div's all floated left, none with defined widths. Now the content in the third div sometimes doesn't fit on one line, and annoyingly, instead of just wrapping neatly, the whole div gets pushed below the first two!

Any suggestions as to how to resolve this? It workd fine on IE (bizzarely) but I get the above behaviour on Firefox PR1

createErrorMsg

4:36 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



three other div's all floated left, none with defined widths

The bolded part is the problem. If you give the floats explicit widths, the text will wrap to that width.