You don't have to even clear anything if you the parent div is floated
right such:

<div id="parent">
  <div id="one">one</div>
  <div id="two">two</div>
  <div id="content">Content</div>
</div>

................................
div#parent {float:left}
div#one {float:left}
div#two {float:left}

that would work just fine without need to any clear at all!

M. Jama

big:interactive
91 Princedale Road
Holland Park
London W11 4NS
Email: [EMAIL PROTECTED]
Direct: +44 (0)20 7313 2262
www.biggroup.co.uk

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Palle
Sent: 12 November 2007 16:19
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Best way to clear a float

Well, in my opinion - it's alway best practice to use CSS, e.g.

<div id="one">one</div>
<div id="two">two</div>
<div id="content">Content</div>

...

div#one {float:left}
div#two {float:left}
div#content {clear:both}

That should do the trick for you. :)



On Nov 12, 2007 4:58 PM, Likely, James A. <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello,
>
> I am curious to see how others clear floats.
>
> Here is the problem. Div one and two float left and take 50% of the
screen.
> Content is to go below the two floats.
>
> <div style="float: left">one</div>
> <div style="float: left">two</div>
> <div>Content</div>
>
> In the past I would use:
>
> <div style="float: left">one</div>
> <div style="float: left">two</div>
> <br style="clear: both; />
> <div>Content</div>
>
> As this seemed to be the only method to make the clear work in IE. I
am
> curious to see how others do this and if you are doing it with out
using the
> <br style="clear:both" />
>
> What method are you using to make this work in IE?
>
> Thanks
>
> Jamie
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> *******************************************************************


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to