Template:Clear/doc: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
(→‎Examples: Now this actually shows how {{Clear}} works.)
m (We don't use a section for this in this Wiki.)
 
Line 1: Line 1:
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.
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 ==
* {{tlx|clear}} →  
* {{tlx|clear}} →  
*: <code>&lt;div style="clear:both;"&gt;&lt;/div&gt;</code>
*: <code>&lt;div style="clear:both;"&gt;&lt;/div&gt;</code>

Latest revision as of 11:29, 20 November 2024

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.

  • {{clear}}
    <div style="clear:both;"></div>
  • {{clear|left}}
    <div style="clear:left;"></div>
  • {{clear|right}}
    <div style="clear:right;"></div>

Examples

Example without {{clear}}

Placeholder tall.png

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}}

Placeholder tall.png

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

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Side1

Can be 'right' or 'left' so content is delayed until just the right or left column is complete. The default clears both columns.

Suggested values
right left both
Default
both
Lineoptional