floating a div

R

Rob Swindells

if I put two div's next to each other using "float : right" like so on
div 2:

[ div 1 ][ div 2 ]
[ div 3 ]

as that div 2 fills up with content it should push div 3 down the page.
It does this in IE6 & Opera 7 but not Mozilla 1.6. Is there an attribute
I can add to the div 2 to make it act properly?

Rob
 
E

Els

Rob said:
if I put two div's next to each other using "float : right" like so on
div 2:

[ div 1 ][ div 2 ]
[ div 3 ]

as that div 2 fills up with content it should push div 3 down the page.
It does this in IE6 & Opera 7 but not Mozilla 1.6. Is there an attribute
I can add to the div 2 to make it act properly?

I think you are looking for <div style="clear:both"></div>
after the second div.
 
R

rf

Els said:
Rob said:
if I put two div's next to each other using "float : right" like so on
div 2:

[ div 1 ][ div 2 ]
[ div 3 ]

as that div 2 fills up with content it should push div 3 down the page.
It does this in IE6 & Opera 7 but not Mozilla 1.6. Is there an attribute
I can add to the div 2 to make it act properly?

I think you are looking for <div style="clear:both"></div>
after the second div.

Apply the style to div 3. No need here for an empty div.

Cheers
Richard.
 
E

Els

rf said:
Rob said:
if I put two div's next to each other using "float : right" like so on
div 2:

[ div 1 ][ div 2 ]
[ div 3 ]

as that div 2 fills up with content it should push div 3 down the page.
It does this in IE6 & Opera 7 but not Mozilla 1.6. Is there an attribute
I can add to the div 2 to make it act properly?

I think you are looking for <div style="clear:both"></div>
after the second div.

Apply the style to div 3. No need here for an empty div.

True. (as long as div 3 won't have another floating element
next to it)
Thought about that after I pressend 'send'.
 
R

Rob Swindells

Els said:
rf said:
Rob Swindells wrote:

if I put two div's next to each other using "float : right" like so on
div 2:

[ div 1 ][ div 2 ]
[ div 3 ]

as that div 2 fills up with content it should push div 3 down the page.
It does this in IE6 & Opera 7 but not Mozilla 1.6. Is there an
attribute
I can add to the div 2 to make it act properly?


I think you are looking for <div style="clear:both"></div>
after the second div.


Apply the style to div 3. No need here for an empty div.


True. (as long as div 3 won't have another floating element next to it)
Thought about that after I pressend 'send'.

Putting clear : both in div 3 worked how I wanted. Thankyou very much.

Rob ( Avagio IT Services )
{
http://www.avagio.co.uk;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top