untitled

(John Hannent) #1
Use the leftvalue, obviously, when you want to override an element floating
left. I’ll leave it up to you to figure out when the rightand bothvalues are
used.

As is usual with CSS (and impossible in traditional HTML), you can apply the
clearproperty to any element, not just text and images. So, if you run into a
situation where you want to ensure that an element is positioned below a
floating element, use clear.

If you do a lot of clearing in a page or site, you might want to create a generic
class that can be applied with a divor spantag, like this:

div.spacer
{
clear: both;
}

Figure 10-12:
When you
want to
move some
text down
beyond a
floated
element,
just use the
clear
property.

196 Part III: Adding Artistry: Design and Composition with CSS

Free download pdf