GDPR, 2018: Please see the revised Pivacy Policy for this wiki: General Data Protection Regulation
EU Cookie Directive: Please see the following note regarding opting in to the use of cookies for this wiki: EU Cookie Directive

Please Note: You must be logged in to edit this wiki and your account must be assigned "editor" rights (set by administrator).

Template:Clear

From SJTAG
Revision as of 21:34, 8 February 2009 by Ian McIntosh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
[edit] Info-doc.png Template documentation

{{clear}} clears all existing floats, causing subsequent content to be displayed starting below the lowest extending floated item. This is used to tidy up layout issues arising from unexpected flow of text around thing like floated images. You can consider this equivalent to inserting an invisible horizontal rule.

For example, a page may be intended to contain two images side by side with text appearing underneath the two. One image is "floated" to the left edge using [[Image:Example1.jpg|left]] and the other floated to the right edge with [[Image:Example2.png|right]], and the text is added to the page below both images. If the browser window is not too wide, then the page will render as expected. However if the browser window width is is increased much beyond the horizontal width of the two images, then the text will start to flow between the images. Inserting {{clear}} after the images and before the text will correct this behaviour.

Usage

Insert {{clear}} after any floated items and before any content which must "clear" the floats.