• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Box Properties > clear Property

12.20. clear Property

The clear property belongs to the family of boxes and margins. It is designed to tell the browser where textual elements should appear onscreen. The clear property is used to set how the specified element will allow other Web page elements to “float” along its sides, determining where the text that appears after the element should appear in relation to it. In this way, it works in exactly the same manner as the clear attribute as used with the <br> HTML tag.

When text follows an image, it generally flows immediately after it in the same vertical space occupied by the image. Using the clear property, you can control where text should appear in relation to the image. This can be handy when you have multiple images appearing on a Web page, and you want to be sure that your text is associated with the right image, and that the images don't appear in a jumble on the page. For example, the following code will create such a jumble:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint