Template:Clear/doc: Difference between revisions
wikipedia>Milker No edit summary |
wikipedia>Milker No edit summary |
||
Line 10: | Line 10: | ||
{{tlx|clear}}: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images. | {{tlx|clear}}: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images. | ||
==Usage== | == Usage == | ||
<nowiki>{{clear}}</nowiki> | <nowiki>{{clear}}</nowiki> | ||
<nowiki>{{clear|left}}</nowiki> | <nowiki>{{clear|left}}</nowiki> | ||
<nowiki>{{clear|right}}</nowiki> | <nowiki>{{clear|right}}</nowiki> | ||
===Example without {{tlf|clear}}=== | == Examples == | ||
=== Example without {{tlf|clear}} === | |||
[[File:HeidelbergTun.jpg|200px|left]] | [[File:HeidelbergTun.jpg|200px|left]] | ||
{{Lorem ipsum}} | {{Lorem ipsum}} | ||
====New section without template==== | ==== New section without template ==== | ||
Without {{tl|clear}}, this section starts at the right of the image. | |||
{{clear}} | {{clear}} | ||
===Example that uses {{tlf|clear}}=== | === Example that uses {{tlf|clear}} === | ||
[[File:HeidelbergTun.jpg|200px|left]] | [[File:HeidelbergTun.jpg|200px|left]] | ||
{{Lorem ipsum}}<br/>'''{{tnull|clear}}''' | {{Lorem ipsum}}<br/> | ||
'''{{tnull|clear}}''' | |||
{{clear}} | {{clear}} | ||
====New section with template==== | ==== New section with template ==== | ||
{{tl|clear}} placed before this section, so it appears below the image. | |||
== TemplateData == | |||
{{TemplateDataHeader}} | {{TemplateDataHeader}} | ||
<templatedata>{ | <templatedata>{ | ||
Line 45: | Line 48: | ||
"format": "inline" | "format": "inline" | ||
}</templatedata> | }</templatedata> | ||
==See also== | == See also == | ||
* {{tl|Clear left}} (implemented using this template) | * {{tl|Clear left}} (implemented using this template) | ||
* {{tl|Clear right}} (implemented using this template) | * {{tl|Clear right}} (implemented using this template) | ||
Line 53: | Line 55: | ||
* {{tl|Float}} | * {{tl|Float}} | ||
* {{tl|Stack}} | * {{tl|Stack}} | ||
<includeonly> | |||
[[Category:Line-handling templates]] | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | ||
[[Category:Wikipedia XHTML tag-replacing templates]] | | <!-- ADD CATEGORIES HERE, and INTERWIKIS IN WIKIDATA --> | ||
</includeonly> | [[{{ns:Category}}:Line-handling templates]] | ||
[[{{ns:Category}}:Wikipedia XHTML tag-replacing templates]] | |||
}}</includeonly> |
Revision as of 15:15, 6 January 2020
Template:Documentation subpage Template:Used in system Template:High-risk Template:Nosubst
This template adds <div style="clear:both;"></div>
, <div style="clear:left;"></div>
, or <div style="clear:right;"></div>
;
for technical HTML details, see Template talk:Clear.
{{clear}}
: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images.
Usage
{{clear}} {{clear|left}} {{clear|right}}
Examples
Example without Template:Tlf

New section without template
Without {{clear}}, this section starts at the right of the image.
Example that uses Template:Tlf

Template:Lorem ipsum
Template:Tnull
New section with template
{{clear}} placed before this section, so it appears below the image.
TemplateData
Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images, so text will appear on a full width line under the image.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Side | 1 | Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns. | Line | optional |
See also
- {{Clear left}} (implemented using this template)
- {{Clear right}} (implemented using this template)
- {{Clear2}}
- {{Float}}
- {{Stack}}