Template:Float: Difference between revisions

From Unofficial Homecoming Wiki
Jump to navigation Jump to search
imported>StarGeek
m (some docs)
imported>Sekoia
(using built in floating classes)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div Style="clear: {{{Side|right}}}; float: {{{Side|right}}};">{{{Item}}}</div><noinclude>
<div {{#if:{{{clear|}}}|style="clear: {{{clear}}};"}} class="float{{{1|{{{side|right}}}}}}">{{{2|{{{item}}}}}}</div><noinclude>{{Documentation}}</noinclude>
 
[[Category:Formatting Templates]]
----
A template that attempts to force floating items not to stack up.  It can '''not''' be used in places where it would overlap a {{Tl|TOCright}} template.
 
'''Format:''' <nowiki>{{Float|Side=|Item=}}</nowiki>
* '''Float''' is the side you want to float it on, left, right, center(?).  If not included, the default is the right side.
* '''Item''' is what  will be floated, whether a table or an image.
</noinclude>

Latest revision as of 21:01, 10 July 2012

{{{item}}}
[edit] [purge] Documentation

Usage

Floats its content to the left or right.

Can be called in the following ways:

  • {{float|left|Float me!}} (floats "Float me!" on the left)
  • {{float|right|Float me!}} (floats "Float me!" on the right)
  • {{float|clear=left|left|Float me!}} (floats "Float me!" on the left, and ensures it comes below anything else on the left)
  • {{float|clear=right|right|Float me!}} (floats "Float me!" on the right, and ensures it comes below anything else on the right)
  • {{float|side=left|item=Float me!}} (floats "Float me!" on the left)
  • {{float|side=right|item=Float me!}} (floats "Float me!" on the right)

You can replace "Float me!" with anything you'd like to float. However, if it contains an equals sign, you'll have to use the explicit "item=" parameter.