.

Template:-: Difference between revisions

Wikicars, a place to share your automotive knowledge
Jump to navigationJump to search
No edit summary
 
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><div style="clear: {{qif|test={{{1|}}}|then={{{1}}}|else=both}};"></div></includeonly><noinclude>Includes a clearing element when used. Very useful for making floating elements stay within their section when the section is very small vertically.
<br clear="all" /><noinclude>
 
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
==Usage==
[[Category:Templates|{{PAGENAME}}]]</noinclude>
<pre>{{-}}</pre>
or
<pre>{{-
|left, right, or both (default: both)
}}</pre>
 
== Example ==
 
=== Header 1 ===
 
<div style="background-color: #f9f9f9; border: 1px solid #cccccc; float: left; margin: 5px; padding: 20px 5px; text-align: center; width: 50px;"><p>''This is a floating element.''</p></div>
Normally Header 2 would start immediately below this text, which would look very ugly.
{{-}}
 
=== Header 2 ===
 
With the clearing element between Header 1 and Header 2, the two headers are separated from each other.
 
[[Category:Templates| ]]</noinclude>

Latest revision as of 19:27, 26 October 2010


This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see Template talk:-.