Template:Clear/doc

From CWS Wiki
Jump to navigation Jump to search
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
Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example

.

  • To clear only the left side of the page, add the code
Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example

.

  • To clear only the right side of the page, add the code
Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example

.

You can also use

Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example
instead of 
Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example
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

Example.jpg

Section 1 text.

Section 2

Section 2 text.

Section 3

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

Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example
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 
Example
Example
Coat of Arms
Example
Territory
Example
National Information
Full Name Example
National Anthem File:Example.ogg
Name in Towny Example
Motto Example
Population Example
Chunks Example
/n list page
Capital City Example
Largest City Example
Oldest City Example
Established Example
Disbanded Example
Discord Example
Government Information
Leader Example
Chancellors Example
Prime Minister Example
Ministers Example
Political System Example
Economic System Example
Official Language Example
Official Religion Example
Army Size Example
Dominions Example
Part of Example
Historical Information
Past Leaders Example
Past Capitals Example
template is to control which elements are displayed next to which other elements.

See also