Template:Clear: Difference between revisions
en>Xaosflux m (Changed protection settings for "Template:Clear": Highly visible template: 3MM+ uses ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))) |
(Created page with "<div style="clear:{{{1|both}}};"></div><noinclude> {{documentation}} </noinclude>") |
(No difference)
|
Revision as of 16:08, 19 June 2023
This template is used on approximately 2,930,000 pages, or roughly 204752% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
File:Information icon4.svg | This template should not be substituted. The markup provided will be confusing to many editors, and as this template provides documentation for itself, there is little justification for substitution. |
Description
This template makes content wait until existing content is completed in all columns. It is often used to prevent text from flowing next to unrelated images.
Usage
{{clear}}
— adds<div style="clear:both;"></div>
{{clear|left}}
— adds<div style="clear:left;"></div>
{{clear|right}}
— adds<div style="clear:right;"></div>
For technical details, see the discussion in the talk page.
Examples
Example without {{clear}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.New section without the template before
Without the code {{clear}}
, this section starts at the right of the image.
Example that uses {{clear}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{clear}}
New section with the template before
Here the code {{clear}}
is placed before this section, so it appears below the image.
TemplateData
TemplateData for Clear
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}} (derived from this template)
- {{Break}}
- {{Float}}
- {{Stack}}