This wiki has had no edits or log actions made within the last 45 days and has been automatically marked as inactive. If you would like to prevent this wiki from being closed, please start showing signs of activity here. If there are no signs of this wiki being used within the next 15 days, this wiki will be closed in accordance to the Dormancy Policy (which all wiki founders accept when requesting a wiki). If this wiki is closed and no one reopens it 135 days from now, this wiki will become eligible for deletion. Note: If you are a bureaucrat, you can go to Special:ManageWiki and uncheck "inactive" yourself.

Template:Clear

From The Richterian History Collective
Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this documentation. (About template documentation)
Editors can experiment in this template's sandbox and test case pages.
Description

This template allows you to clear the left side, right side, or both sides of the page. Clearing means that the content following the template will not be displayed until the existing content on the specified sides (for example, "hanging" or floating images or blocks) is displayed completely. This template is often used so that the text does not flow around unrelated images.

The template adds the following code to the page: <div style="clear:left/right/both;"></div> (the value after clear depends on the parameters). This code affects elements with the CSS property float, including files floated to the side (for example, [[File:Image.png|right]]).

Syntax
  • To clear both sides of the page, add the code {{Clear}}.
  • To clear only the left side of the page, add the code {{Clear|<left>}}.
  • To clear only the right side of the page, add the code {{Clear|<right>}}.

You can also use {{-}} instead of {{Clear}} as a shorthand call for this template.

Example

=== Section 1 ===
[[File:Example.jpg|200px|right]]
Section 1 text.

=== Section 2 ===
Section 2 text.
{{Clear|right}}

=== Section 3 ===
Section 3 text.

This code produces the following result:


Section 1[edit source]

Section 1 text.

Section 2[edit source]

Section 2 text.

Section 3[edit source]

Section 3 text.


As you can see above, the example image added in section 1 is displayed to the right and extends down through section 2, while the {{Clear}} template is called at the end of the second section, resulting in the example image not being next to section 3. Thus, one use of the {{Clear}} template is to control which elements are displayed next to which other elements.

See also[edit source]