Template:Clear: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
Line 1: Line 1:
<includeonly><div style="clear: both; {{#if: {{{1|}}} | height: {{{1}}}px; }}"></div></includeonly><noinclude>
<includeonly><div style="clear: {{#if: {{{left|}}} | left | {{#if: {{{right|}}} | right | both}} }}; {{#if: {{{1|}}} | height: {{{1}}}px; }}"></div></includeonly><noinclude>
Use this template at the end of an article section to make sure that images or other media don't flow over to the next section.  Blank space will be added to the section to ensure this.
Use this template at the end of an article section to make sure that images or other media don't flow over to the next section.  Blank space will be added to the section to ensure this.



Latest revision as of 22:51, 21 May 2024

Use this template at the end of an article section to make sure that images or other media don't flow over to the next section. Blank space will be added to the section to ensure this.

Example:

=== Some section ===

[[File:Some_image.jpg|thumb|right|200px|Look at this nice image at the right side of the page.]]

Some text that isn't very long.

{{clear}}

=== The next section ===

Blah blah blah.

In this example, there will be some blank space below the text "Some text that isn't very long" to ensure that the header "The next section" appears after the bottom of Some_image.jpg is reached. If {{clear}} wasn't used, the header of the next section would appear right after the text of the previous section, and it wouldn't be clear what section the image belongs to.

Note that this isn't always necessary or desired; sometimes it doesn't matter that much whether it's clear which section an image is in, or the image only slightly cuts into the next section which looks less bad than the blank space that would be caused by this template. Choose freely whether to use it or not depending on what you think looks nicer and clearer for the reader.

A parameter can be provided for extra blank space (in pixels):

{{clear|20}}