Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Clear/doc: Difference between revisions

Template page
{{clarify|date=August 2013|what is this template for?}}
m Reverted edits by The Mirror of Bangladesh (talk) to last revision by 2604:3D08:9476:BE00:BC20:CE2:7522:CB98
 
(15 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{TemplateBox
{{redirects|Clr|-}}{{heavily used template}}{{cascade-protected template}}{{TemplateBox
|1=1
|1label-en=side
|1d=Which side to clear on: “left”, “right” or “both”
  |1d-de=Welche Seite zu berücksichtigen ist: “left” (links), “right” (rechts) oder “both” (beide)
|1type=line
|1def=both
|1stat=optional
 
|name=Clear
|name=Clear
|desc=Code: <code><nowiki><div style="clear:both"></div></nowiki></code>
|desc=This template clears floating elements, that is, it inserts as much space as needed so that the content after this template is below all floating elements (or elements floating to a given side of the page, if a side is specified).
 
  |desc-de=Diese Vorlage löscht schwebende Elemente, d.h. sie fügt so viel Platz wie nötig ein, damit sich der Inhalt nach dieser Vorlage unter allen schwebenden Elementen befindet (oder unter den schwebenden Elementen auf einer bestimmten Seite der Seite, wenn eine Seite angegeben ist).
This is not the same as {{t1|-}}, which is a <code><nowiki><br></nowiki></code> element (it adds space).
|namespace=all
|namespace=
|usergroup=all
|usergroup=all
|placement=
|placement=
|usage-notes={{clarify|date=August 2013|what is this template for?}}
|usage-notes=Code: <code><nowiki><div style="clear:both"></div></nowiki></code>
|type=
|type=
|example=
|example=
|i18n-method=-
|i18n-method=-
|i18n-desc=
|i18n-desc=
|seealso=
|seealso=*{{tl|Clear2}}
|setscats=
|setscats=
|lines=
|lines=
|shorthand=
|shorthand={{T|clr}}
|relieson=
|relieson=
}}
|useTemplateData=only
 
}}<includeonly>
==See also==
*{{tl|Opaque}}<includeonly>
[[Category:Typing-aid templates]]
[[Category:Typing-aid templates]]
[[Category:Formatting templates]]
[[Category:Formatting templates]]
</includeonly>
</includeonly>

Latest revision as of 14:39, 18 April 2025

This template clears floating elements, that is, it inserts as much space as needed so that the content after this template is below all floating elements (or elements floating to a given side of the page, if a side is specified).

Usage

{{Clear |1= }}

Or use the shorthand

Code: <div style="clear:both"></div>

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template clears floating elements, that is, it inserts as much space as needed so that the content after this template is below all floating elements (or elements floating to a given side of the page, if a side is specified).

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
side1

Which side to clear on: “left”, “right” or “both”

Default
both
Lineoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also

Localization

This template is not intended to be localized.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.