Template:Clear/doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{documentation |This template forces everything after the 'clear' to be on a new line. In other words, it forces a line break. |<code><nowiki>{{clear}}</nowiki></code> |<code...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{documentation | {{documentation | ||
|This template forces everything after the 'clear' to be on a new line. In other words, it forces | |This template forces everything after the 'clear' to be on a new line. In other words, it forces all content after the template to be under anything ''before'' where the template is placed. | ||
|<code><nowiki>{{clear}}</nowiki></code> | |<code><nowiki>{{clear}}</nowiki></code> | ||
|<code><nowiki>Typing exactly like this...{{clear}}...with a clear template thrown in mid-sentence creates this...</nowiki></code> | |<code><nowiki>Typing exactly like this...{{clear}}...with a clear template thrown in mid-sentence creates this...</nowiki></code> | ||
Typing exactly like this...{{clear}}...with a clear template thrown in mid-sentence creates this...}}<noinclude>[[Category:Doc templates]]</noinclude> | Typing exactly like this...{{clear}}...with a clear template thrown in mid-sentence creates this...<br><br>{{clear}} | ||
[[File:warehouse_preview.png|110px|left]]In this example, you will see this text...<br>...aligns along with the image...<br>...as it should, when an image is aligned left or right.<br>However, when looking at the next example whilst using a clear template, things look different. | |||
[[File:warehouse_preview.png|110px|left]]{{clear}}But if you type <code><nowiki>{{clear}}</nowiki></code> right after the image...<br>You'll notice that all of the text will be forced ''under'' the image, because that's what the template does.<br>This same thing happens when putting the template after divs and tables.<br>This template is very useful for clearing out spaces on pages.}}<noinclude>[[Category:Doc templates]]</noinclude> |
Latest revision as of 02:13, 22 November 2021
Template Documentation
Description
This template forces everything after the 'clear' to be on a new line. In other words, it forces all content after the template to be under anything before where the template is placed.
Syntax
{{clear}}
Examples
Typing exactly like this...{{clear}}...with a clear template thrown in mid-sentence creates this...
...with a clear template thrown in mid-sentence creates this...
In this example, you will see this text...
...aligns along with the image...
...as it should, when an image is aligned left or right.
However, when looking at the next example whilst using a clear template, things look different.
...aligns along with the image...
...as it should, when an image is aligned left or right.
However, when looking at the next example whilst using a clear template, things look different.
But if you type
You'll notice that all of the text will be forced under the image, because that's what the template does.
This same thing happens when putting the template after divs and tables.
This template is very useful for clearing out spaces on pages.
{{clear}}
right after the image...You'll notice that all of the text will be forced under the image, because that's what the template does.
This same thing happens when putting the template after divs and tables.
This template is very useful for clearing out spaces on pages.