Prev | Current Page 148 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

0 Programmer??™s
Reference (2001, McGraw-Hill
Osborne Media). In short, as Eric
writes, ???When an element is ?¬‚ oated,
??¦ these (?¬‚ oat) rules say ???place the
element as high, and as far to one
side, as possible??™???
Even though it was published
years ago, this book is an essential
reference for any serious CSS programmer
as it contains a level of
detail about the inner workings of
CSS that is almost impossible to ?¬? nd
elsewhere.
STYLIN??™ WITH CSS - CHAPTER 4 116
The Clear Property
The other property that is frequently used with ?¬‚ oat is clear. Any element
that has room to do so will move up next to a ?¬‚ oated element,
but sometimes, you don??™t want this to happen; you want it to clear??”
that is, to sit below (not beside) the ?¬‚ oated element. To demonstrate
this point, Figure 4.17 shows a layout where each item comprises an
image with text next to it, achieved by ?¬‚ oating the images. It??™s like the
example shown in Figure 4.16, but repeated three times.
FIGURE 4.17 Because there is room,
the third image and its text can ?¬‚ oat
up next to the second image??”not
the desired effect.
Here??™s the XHTML (with the content edited to save space)

Here's a lovely picture of Dartmoor...



POSITIONING ELEMENTS 117

My sister lived in this delightful cottage .


Pages:
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160