Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > floating a div

Reply
Thread Tools

floating a div

 
 
Rob Swindells
Guest
Posts: n/a
 
      03-04-2004
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
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      03-04-2004


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.

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      03-04-2004

"Els" <(E-Mail Removed)> wrote in message
news:40471e06$0$41756$(E-Mail Removed) i.nl...
>
>
> 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.

Cheers
Richard.


 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      03-04-2004
rf wrote:

> "Els" <(E-Mail Removed)> wrote in message
> news:40471e06$0$41756$(E-Mail Removed) i.nl...
>
>>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'.

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

 
Reply With Quote
 
Rob Swindells
Guest
Posts: n/a
 
      03-04-2004
Els wrote:
> rf wrote:
>
>> "Els" <(E-Mail Removed)> wrote in message
>> news:40471e06$0$41756$(E-Mail Removed) i.nl...
>>
>>> 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;
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM
DVD Verdict reviews: A STORY OF FLOATING WEEDS / FLOATING WEEDS: CRITERION COLLECTION and more! DVD Verdict DVD Video 0 04-20-2004 09:04 AM
CSS: How to position a DIV below a floating DIV? Tamlyn Rhodes HTML 3 02-26-2004 10:33 PM



Advertisments