Template:Floated box
{{{1}}}
| This template uses TemplateStyles: |
Use this template if you want a non-quotation to be styled as a quote box. Do not use this template for actual quotations! It does not output <blockquote>...</blockquote> tags.
Usage
[edit]Parameters
[edit]1- The text in the box.
left- If
yesis specified, the box becomes left-floated. class- Additional classes for the box, e.g. specifying
noprintwill hide the box if you print the page. width- Custom width for the box (in any CSS unit).
bottommargin,topmargin,leftmargin,rightmargin- Custom margins for the box (in any CSS units).
bottommargin- bottom margin of the box,topmargin- top margin of the box, etc. float- If
noneis specified, the box isn't floated.
Examples
[edit]This template defaults to being right-floated:
{{floated box|1=This is example text with default alignment.}}
This is example text with default alignment.
It becomes left-floated if you specify |left=yes:
{{floated box|1=This is example text in a left-aligned box.|left=yes}}
This is example text in a left-aligned box.
You can also remove the alignment completely if you specify |float=none (don't forget |leftmargin=0):
{{floated box|1=This is example text in a non-aligned box.|float=none|leftmargin=0}}
This is example text in a non-aligned box.
Custom width can be specified using the |width= parameter:
{{floated box|1=This is example text with default alignment and 50% width.|width=50%}}
This is example text with default alignment and 50% width.
Note that none of the above applies to mobile devices (i.e. viewports smaller than 640px wide).
Custom margins can be specified using the |bottommargin=, |topmargin=, |leftmargin= and |rightmargin= parameters:
{{floated box|1=This is example text with default alignment, 50% width and custom margins.|width=50%|bottommargin=2em|topmargin=2em|leftmargin=4em|rightmargin=4em}}
This is example text with default alignment, 50% width and custom margins.
Additional classes can be specified using the |class= parameter, e.g. |class=noprint will hide the box when a page is printed:
{{floated box|1=This is example text you can't see when you print the page ([https://en.wikipedia.org/w/index.php?title=Special:DownloadAsPdf&page=Template%3AFloated_box%2Fdoc&action=show-download-screen try it]).|class=noprint}}