Archive for the ‘Front-end Development’ Category

The Advanced Clear-Fix

Friday, October 23rd, 2009

A common CSS issue is when a floated element is placed within a container div. What happens is that the floated element does not automatically force the height of the container to adjust, and the parent container then takes up zero space. When an element is floated, its parent no longer contains its children because the float is removed from the cascade. Here, I discuss how to remedy this situation.