2 results
tagged
float
Understanding CSS Layout And The Block Formatting Context
How a Block Formatting Context (BFC) behaves is easiest to understand with a simple float example. In the below example I have a box that contains an image that has been floated left and some text. If we have a good amount of text it wraps around the floated image and the border then runs around the whole lot.
There are two ways in which we ordinarily fix this layout problem. One would be to use a clearfix hack, which has the effect of inserting an element below the text and image and setting it to clear both. The other method is to use the overflow property, with a value other than the default of visible.
.outer {
overflow: auto;
}
July 27, 2018 at 1:16:45 PM EDT
*
FILLER
The Mystery Of The CSS Float Property « Smashing Magazine
October 20, 2009 at 10:35:59 AM EDT
*
FILLER