Difference between revisions of "Template:Clear"
Jessietail (talk | contribs) m |
Jessietail (talk | contribs) |
||
Line 1: | Line 1: | ||
<includeonly><div style="clear: {{ #if: {{{1|}}} | {{{1}}} | both }};"></div></includeonly> | <includeonly><div style="clear: {{ #if: {{{1|}}} | {{{1}}} | both }};"></div></includeonly><noinclude>__NOTOC__ | ||
<noinclude> | |||
== Usage instructions == | == Usage instructions == | ||
This template inserts a < | This template inserts a <code><nowiki><div style="clear:both;"></div></nowiki></code> block wherever it's placed. This prevents all text below the template from wrapping and forces it to display completely after any images above the template. This can be used to stop text from flowing next to unrelated images, or to keep page formatting clean at resolutions different than what the article was written for. | ||
[[Category: | |||
To use this template, add the tag <code><nowiki>{{clear}}</nowiki></code> prior to the text intended to clear. | |||
Optionally, the first parameter can be set to to ''left'' or ''right'' to only have it clear that side, inserting a <code><nowiki><div style="clear:left;"></div></nowiki></code> or <code><nowiki><div style="clear:right;"></div></nowiki></code> block. | |||
To use this template in this way, add the tag <code><nowiki>{{clear|left}}</nowiki></code> to clear the left side, or <code><nowiki>{{clear|right}}</nowiki></code> to clear the right side. | |||
===Example without <nowiki>{{clear}}</nowiki>=== | |||
[[File:HoverScout(Solo).JPG|200px|left|Example image]] | |||
This paragraph is an example paragraph that is not long enough to extend to the bottom of the example image to its left. This will result in the section immediately following this paragraph to display next to the image, despite not being related to the image. | |||
====New section without template==== | |||
See how this starts next to the image? | |||
{{Clear}} | |||
===Example with <nowiki>{{clear}}</nowiki>=== | |||
[[File:HoverScout(Solo).JPG|200px|left|Example image]] | |||
This paragraph is an example paragraph that is not long enough to extend to the bottom of the example image to its left. This will result in the section immediately following this paragraph to display next to the image, despite not being related to the image. | |||
<code><nowiki>{{clear}}</nowiki></code>{{clear}} | |||
====New section with template==== | |||
See how this starts below the image? | |||
[[Category:Formatting templates]]</noinclude> |
Revision as of 14:51, 16 September 2017
Usage instructions
This template inserts a <div style="clear:both;"></div>
block wherever it's placed. This prevents all text below the template from wrapping and forces it to display completely after any images above the template. This can be used to stop text from flowing next to unrelated images, or to keep page formatting clean at resolutions different than what the article was written for.
To use this template, add the tag {{clear}}
prior to the text intended to clear.
Optionally, the first parameter can be set to to left or right to only have it clear that side, inserting a <div style="clear:left;"></div>
or <div style="clear:right;"></div>
block.
To use this template in this way, add the tag {{clear|left}}
to clear the left side, or {{clear|right}}
to clear the right side.
Example without {{clear}}
This paragraph is an example paragraph that is not long enough to extend to the bottom of the example image to its left. This will result in the section immediately following this paragraph to display next to the image, despite not being related to the image.
New section without template
See how this starts next to the image?
Example with {{clear}}
This paragraph is an example paragraph that is not long enough to extend to the bottom of the example image to its left. This will result in the section immediately following this paragraph to display next to the image, despite not being related to the image.
{{clear}}
New section with template
See how this starts below the image?