This link has been bookmarked by 106 people . It was first bookmarked on 04 Jun 2006, by Jon Phipps.
-
12 Mar 16
-
"A floated box must have an explicit width..."
-
If no width is set, the results can be unpredictable. Theoretically, a floated element with an undefined width should shrink to the widest element within it. This could be a word, a sentence or even a single character - and results can vary from browser to browser.
-
Block level elements above a floated element will not be affected by it. However, elements below will wrap around the floated element
-
While content will wrap around a floated element, border, background image and background color will extend underneath
-
-
16 Jan 15
-
28 Oct 14
-
If there isn't enough horizontal room on the current line for the floated box, it will move downward, line by line, until a line has room for it.
-
-
21 Aug 14
-
22 Aug 12
-
08 Jun 12
-
11 May 12
-
20 Jan 12
-
09 Dec 11
-
18 Nov 11
-
04 May 11
-
31 Mar 11
-
always set a width on floated items
-
-
05 Oct 10
-
07 Jul 10
-
03 Dec 09
-
19 Nov 09
-
21 Oct 09
-
25 Sep 09
-
06 Sep 09
-
02 Sep 09
-
24 Aug 09
-
18 Aug 09
-
12 Jun 09
-
05 Jun 09
-
11 May 09
-
07 Apr 09
-
19 Mar 09
-
10 Feb 09
-
16 Jan 09
-
31 Dec 08
-
You should always set a width on floated items
-
If no width is set, the results can be unpredictable. Theoretically, a floated element with an undefined width should shrink to the widest element within it. This could be a word, a sentence or even a single character - and results can vary from browser to browser.
-
Block level elements above a floated element will not be affected by it. However, elements below will wrap around the floated element:
-
If you do not want elements below a floated element to wrap around it, you can apply the clear property to the following element using "clear: left", "clear: right" or "clear: both".
-
-
06 Nov 08
-
03 Nov 08
-
24 Aug 08
-
08 Apr 08
-
17 Mar 08
-
04 Feb 08
-
21 Jan 08
-
29 Nov 07
-
19 Sep 07
-
05 Sep 07
-
17 Aug 07
-
When you float an element it becomes a block box.
-
You should always set a width on floated items (except if applied directly to an image - which has implicit width). W3C's Cascading Style Sheets, level 2, CSS2 Specifications states:
"A floated box must have an explicit width..."
If no width is set, the results can be unpredictable.
-
-
24 Jun 07
-
09 Apr 07
-
04 Apr 07
-
28 Mar 07
-
12 Mar 07
-
Float basics
-
-
14 Feb 07
-
20 Nov 06
-
18 Aug 06
-
22 Jun 06
-
27 Mar 06
-
01 Mar 06
-
26 Feb 06
-
20 Feb 06
-
09 Dec 05
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.