Template:Clear: Difference between revisions

From Celeste Wiki
Jump to navigation Jump to search
Content added Content deleted
m (Changed protection level of Template:Clear: Enable access by template editors; NeilN is okay with this move ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
m (1 revision imported: Importing general purpose templates)
Line 1: Line 1:
<div style="clear:{{{1|both}}};"></div><noinclude>
<div style="clear: both"></div><noinclude>

{{documentation}}
== Usage ==
</noinclude>

Note there are no parameters for this template

'''<nowiki>{{Clear}}</nowiki>''' Included in page code, inserts the following code:
<nowiki><div style="clear: both"></div></nowiki>

This template adds <tt>&lt;div style="clear: both"&gt;&lt;/div&gt;</tt>;
for technical XHTML details see [[Template talk:Clear]].

== Documentation ==

{{tl|clear}}: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images.

=== Usage ===

<nowiki>{{subst:Clear}}</nowiki>

The template may also be transcluded, but as the
markup provided is unlikely to change or improve,
there is little justification for transclusion
overhead.

== Example without the '''<nowiki>{{clear}}</nowiki>''' template==

[[Image:Hitlers grandson.jpg|300px|left]]
{{lorum}}
==New section==
See how this section starts at the right of the image, with the line actually overlapping the image

<div style="clear: both"></div> <!-- a genuine use of the template! -->
== Example with the '''<nowiki>{{clear}}</nowiki>''' template==

[[Image:Hitlers grandson.jpg|300px|left]]
{{lorum}}
'''<nowiki>{{clear}}</nowiki>'''
<div style="clear: both"></div>

==New section==
See how this looks much better?

==How it works==
This is what {{Tl|clear}} actually does, ignore the <tt>&lt;noinclude&gt;</tt> stuff shown by <nowiki>{{msgnw:clear}}</nowiki>:

== Discussion ==

''The fine points of {{Tl|clear}} vs. {{Tl|-}} are discussed in [[Template talk:-#-_versus_clear|Template talk:-]].''

[[Category:Utility templates|{{PAGENAME}}]]</noinclude>

Revision as of 22:50, 8 January 2021

Usage

Note there are no parameters for this template

{{Clear}} Included in page code, inserts the following code:

<div style="clear: both"></div>

This template adds <div style="clear: both"></div>; for technical XHTML details see Template talk:Clear.

Documentation

{{clear}}: Makes content wait until existing content is completed in all columns. Often used to stop text from flowing next to unrelated images.

Usage

{{subst:Clear}}

The template may also be transcluded, but as the markup provided is unlikely to change or improve, there is little justification for transclusion overhead.

Example without the {{clear}} template

File:Hitlers grandson.jpg

Template:Lorum

New section

See how this section starts at the right of the image, with the line actually overlapping the image

Example with the {{clear}} template

File:Hitlers grandson.jpg

Template:Lorum {{clear}}

New section

See how this looks much better?

How it works

This is what {{clear}} actually does, ignore the <noinclude> stuff shown by {{msgnw:clear}}:

Discussion

The fine points of {{clear}} vs. {{Template:Clear}} are discussed in Template talk:-.