HTML and CSS Reference
In-Depth Information
Figure 7-3. Controlling the individual margins with CSS results in cleaner lines
To move the image to the other side, floatright.html changes the class from floatleft to floatright (see
Figure 7-4 ).
Figure 7-4. Floating the image to the right results in text flowing round the left
If you prefer a wider or narrower margin, simply adjust the values in the class definitions.
In Figures 7-3 and 7-4 , the image is the first element inside a paragraph, which acts as its parent.
Consequently, the image floats to the left or right of the paragraph, and the text flows around it. When the text
Search WWH ::

Custom Search