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: leftone/div
div style=float: lefttwo/div
divContent/div
In the past I would use:
div style=float:
I used br clear: both until I read somewhere authoritive that it's
better to use a div.
So I started using a div and IE reared its ugly head on occasion.
Georg from Norway gave me an IE bug killer div!-- --/div
(clear: both in CSS)
and I've had no more problems.
Hello,
I am curious to
My preference would be to clear floats through the CSS and not through
adding in any additional markup. The code for this is below, so any two
elements being floated to sit side by side should be put in a container with
the class .clearfix.
I use this approach purely because I view this as a
Well, in my opinion - it's alway best practice to use CSS, e.g.
div id=oneone/div
div id=twotwo/div
div id=contentContent/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
Hello James,
Maybe you can do this:
div style=width: 100%; overflow: hidden;
div style=float:left;Left/div
div style=flaot:rightRight/div
/div
hope this can help you.
Likely, James A. [EMAIL PROTECTED] wrote: Best way to clear a float
Hello,
I am curious to see how
On 12-Nov-07, at 9:28 PM, Likely, James A. wrote:
I am curious to see how others clear floats.
Jamie,
I often use this method [1]. It seems to work well, and far better
CSS-brains than myself have recommended it.
Best,
- Rahul.
[1] http://www.positioniseverything.net/easyclearing.html
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=oneone/div
div id=twotwo/div
div id=contentContent/div
...
div#one {float:left}
div#two {float:left}
div#content {clear:both}
That should do
@webstandardsgroup.org
Subject: Re: [WSG] Best way to clear a float
My preference would be to clear floats through the CSS and not through
adding in any additional markup. The code for this is below, so any two
elements being floated to sit side by side should be put in a container
with the class .clearfix.
I use
On Mon, 12 Nov 2007 09:58:37 -0600, Likely, James A. wrote:
Hello,
I am curious to see how others clear floats.
*Sometimes* I find this works:
#parent {overflow: auto;}
This does require thorough testing, however.
Another simple method is the one Mohamed described - floats
always contain
On Mon, 12 Nov 2007 09:58:37 -0600, Likely, James A. wrote:
Hello,
I am curious to see how others clear floats.
*Sometimes* I find this works:
#parent {overflow: auto;}
This does require thorough testing, however.
Another simple method is the one Mohamed described - floats
always contain
Why not just use clearfix?
On Nov 12, 2007 12:15 PM, David Hucklesby [EMAIL PROTECTED] wrote:
On Mon, 12 Nov 2007 09:58:37 -0600, Likely, James A. wrote:
Hello,
I am curious to see how others clear floats.
*Sometimes* I find this works:
#parent {overflow: auto;}
This does require
*Sometimes* I find this works:
#parent {overflow: auto;}
You need to combine that with a width for it to work in IE. You might also
find in some situations that you need to use oveflow: hidden as auto will
create scrollbars.
--
Tyssen Design
www.tyssendesign.com.au
Ph: (07) 3300 3303
Mb:
On Behalf Of John Faulds
*Sometimes* I find this works:
#parent {overflow: auto;}
You need to combine that with a width for it to work in IE.
I think it is a hasLayout issue, so it is possible to make it work without
having to declare a width (using zoom:1 for example).
You might also
out though.
Tim
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Thierry Koblentz
Sent: Tuesday, 13 November 2007 9:04 AM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] Best way to clear a float
On Behalf Of John Faulds
*Sometimes* I find this works
re - using the 'clearfix' fix... as a way of clearing floats by
not adding any additional markup
i've always thought that argument was a bit of a stretch. You are
adding extra markup - and its hardcoded presentational markup. What
happens when you have class=clearfix all through your code and
15 matches
Mail list logo