Template talk:-

Latest comment: 18 years ago by Omniplex in topic Discussion

Documentation

edit

{{-}} contains the markup:

<div style="clear:{{{1|both}}}"></div><noinclude>{{doc}}</noinclude>

Purpose

edit

Causes any previously-established float to clear.

The unusual name of this template is a mnemonic for an imaginary horizontal line, which separates floating elements above from those below. Some editors prefer the mnemonic {{clr}} ("clear"), which simply redirects here.

Usage

edit

{{-}}

Use this template after any floating elements and before elements you do not wish to float together with the first set.

Examples

edit
{| align="right"
starts a table floating right e.g. for an
infobox next to the ToC. For better
examples check out Wrapper. Please
add missing {{-}} where necessary.
 
This ugly table is only a quick example.

First

edit
  • Cute, but less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.
{| align="right"
starts a table floating right e.g. for an
infobox next to the ToC. For better
examples check out Wrapper. Please
add missing {{-}} where necessary.
 
This ugly table is only a quick example.

Second

edit
  • Cute, but
    less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.


In the first example {{-}} after the word browser guarantees that the table doesn't float into the second example. In the second example the position of {{-}} is after the word but. Note that it doesn't affect the left margin of the bullet * list, because it's used after the bullet.



{| align="right"
starts a table floating right e.g. for an
infobox next to the ToC. For better
examples check out Wrapper. Please
add missing {{-}} where necessary.
 
This ugly table is only a quick example.

Third

edit
  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.

{| align="right"
starts a table floating right e.g. for an
infobox next to the ToC. For better
examples check out Wrapper. Please
add missing {{-}} where necessary.
 
This ugly table is only a quick example.

Fourth

edit
  • Cute, but

less funny if it overlaps the next table or section, causing horizontal scrolling or worse depending on the browser.


The third and forth examples are identical to the first two, except for the addition of a single new-line; the third example having it after the word but, and the fourth example having it after the {{-}} that follows the word but. Note that only the first line of the list-items is properly indented now.

See also

edit

Discussion

edit

Add issues below as you see fit, sign with ~~~~

Details

edit

For more technical details see the talk page on Wikipedia. -- Omniplex (w:t) 01:20, 22 April 2006 (UTC)Reply

clear:both

edit

Adding clear:both is AFAIK redundant, therefore I've removed it. That editor also added

style="margin:0;border:0;padding:0;line-height:0"

What's the point of this? It forces all readers of pages with {{-}} to download this inline CSS, and it's a difference from Wikipedia, complicating TransWiki copying between Meta and Wikipedia e.g. for help pages using {{-}}.

If the inline CSS is vital for many purposes it could be added also on Wikipedia, but otherwise I intend to remove it.

-- Omniplex (w:t) 01:24, 22 April 2006 (UTC)Reply

Return to "-" page.