This link has been bookmarked by 426 people . It was first bookmarked on 30 Jun 2008, by Kim Woodbridge.
-
15 May 12
-
14 May 12
-
07 May 12
-
18 Apr 12
-
01 Apr 12
-
31 Mar 12
-
26 Mar 12
Ken HarperQuick fix: Make sure you don't have any images that do this, use overflow: hidden to cut off excess.
-
10 Mar 12
-
17 Feb 12
-
15 Feb 12
-
10 Feb 12
-
26 Jan 12
-
20 Jan 12
-
11 Jan 12
-
28 Dec 11
Mycroft HolmesFloat is a CSS positioning property. To understand its purpose and origin, we can look to print design.
-
10 Nov 11
-
13 Oct 11
-
28 Sep 11
-
27 Sep 11
-
17 Jun 11
-
In web design, page elements with the CSS float property applied to them are just like the images in the print layout where the text flows around them. Floated elements remain a part of the flow of the web page. This is distinctly different than page elements that use absolute positioning. Absolutely positioned page elements are removed from the flow of the webpage, like when the text box in the print layout was told to ignore the page wrap. Absolutely positioned page elements will not affect the position of other elements and other elements will not affect them, whether they touch each other or not.
-
-
12 Jun 11
-
07 Jun 11
-
01 Jun 11
-
26 May 11
-
- The Empty Div Method is, quite literally, an empty div. <div style="clear: both;"></div>.
Techniques for Clearing Floats
If you are in a situation where you always know what the succeeding element is going to be, you can apply the clear: both; value to that element and go about your business. This is ideal as it requires no fancy hacks and no additional elements making it perfectly semantic. Of course things don't typically work out that way and we need to have more float-clearing tools in our toolbox.
-
Double Margin Bug - Another thing to remember when dealing with IE 6 is that if you apply a margin in the same direction as the float, it will double the margin. Quick fix: set display: inline on the float, and don't worry it will remain a block-level element.
-
-
12 May 11
-
24 Apr 11
-
19 Apr 11
-
31 Mar 11
-
16 Mar 11
-
15 Mar 11
-
25 Feb 11
-
09 Feb 11
-
07 Feb 11
-
18 Jan 11
-
27 Dec 10
-
20 Dec 10
-
18 Dec 10
-
17 Dec 10
-
12 Dec 10
-
06 Dec 10
-
27 Nov 10
-
24 Nov 10
-
02 Nov 10
-
01 Nov 10
-
21 Oct 10
-
28 Sep 10
-
18 Aug 10
-
17 Aug 10
-
10 Aug 10
alexanderkAll About floating elements on the page with the quirks that are associated with it.
-
27 Jul 10
-
12 Jul 10
-
09 Jul 10
Mark Blair"Float is a CSS positioning property. To understand its purpose and origin, we can look to print design. In a print layout, images may be set into the page such that text wraps around them as needed. This is commonly and appropriately called “text wrap”. Here is an example of that."
-
28 Jun 10
-
06 Jun 10
-
01 Jun 10
-
26 May 10
-
19 May 10
-
14 May 10
-
06 May 10
-
28 Apr 10
-
22 Apr 10
-
19 Apr 10
-
18 Apr 10
-
13 Apr 10
-
12 Apr 10
-
08 Apr 10
-
26 Mar 10
-
23 Mar 10
-
This method is scorned by semantic purists since its presence has no contexual meaning at all to the page and is there purely for presentation. Of course in the strictest sense they are right, but it gets the job done right and doesn’t hurt anybody.
-
relies on setting the overflow CSS property on a parent element. If this property is set to auto or hidden on the parent element, the parent will expand to contain the floats, effectively clearing it for succeeding elements
-
lso bear in mind that the overflow property isn’t specifically for clearing floats. Be careful not to hide content or trigger unwanted scrollbars.
-
However if you find yourself adding a new div just to apply this, it is equally as unsemantic as the empty div method and less adaptable. Also bear in mind that the overflow property isn’t specifically for clearing floats. Be careful not to hide content or trigger unwanted scrollbars.
-
This will apply a small bit of content, hidden from view, after the parent element which clears the float. This isn’t quite the whole story, as additional code needs to be used to accomodate for older browsers.
-
Make sure you don’t have any images that do this, use overflow: hidden to cut off excess.
-
Another
-
-
11 Mar 10
-
07 Mar 10
-
25 Feb 10
-
18 Feb 10
-
08 Feb 10
-
01 Feb 10
-
31 Jan 10
-
29 Jan 10
-
28 Jan 10
-
21 Jan 10
-
20 Jan 10
-
18 Jan 10
de Villamil FrédéricFloat is a CSS positioning property. To understand its purpose and origin, we can look to print design. In a print layout, images may be set into the page such that text wraps around them as needed. This is commonly and appropriately called “text wrap”.
-
17 Jan 10
-
08 Jan 10
Nohant NohantFloat is a CSS positioning property. To understand its purpose and origin, we can look to print design. In a print layout, images may be set into the page such that text wraps around them as needed. This is commonly and appropriately called “text wrap”. H
-
05 Dec 09
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.