HTML and CSS Reference
In-Depth Information
The float property allows you to specify how you want the element to lay out amongst
the other elements around it. You can specify to float: left or to float: right . This will move
the image element to the left or the right, respectively, and allow the text to flow around it
smoothly. The following code demonstrates how to specify this:
img.flower {
float: left;
left: 215px;
top: 100px;
height: 50px;
width: 50px;
}
img.orange {
float: right;
left: 215px;
top: 100px;
height: 50px;
width: 50px;
}
The output of the above code is shown in Figure 4-33.
FIGURE 4-33 Images in line with text with their float properties specified
Now, with the float property specified, the text is flowing smoothly around the images.
 
Search WWH ::




Custom Search