Template:Float file box/doc
This is an alternative version of {{float file}}. It is similarly used to display an image to the left of an infobox, but it additionally accommodates placing long captions on small images (small images usually cause long captions to cut off and/or break into many unsightly lines). It also accommodates multiple images with captions.
Please use the standard image thumbnail mode if possible ([[File:Terraria.png|thumb|Image caption.]]
). This template should only be used for particularly narrow images or a more complex image arrangement.
Usage
{{ float file box | <image 1 wiki code> | <image 1 caption> | <image 2 wiki code> | <image 2 caption> | ... | title = <box title> | title3/5/... = <sub-title above image 2/3/...> | float = right/left/none | width = <box width> | class = <custom CSS class> | css/style = <custom box styling> }}
- First, third, fifth, etc. unnamed parameter
Complete wiki code for an image, including brackets. Can be continued nearly infinitely.
- Second, fourth, sixth, etc. unnamed parameter
Text of the caption beneath the image. Can be continued nearly infinitely.
- title
Text displayed as the title of the box.
- title3, title5, etc.
Title within the box above the corresponding unnamed parameter. For example, $title3
will be displayed above the contents of the third unnamed parameter, i.e. the second image.
- float
Float position, defaults to right
.
- width
Width of the box, defaults to 150px
. Make sure that the box is at least as wide as the widest image in it plus 20px; otherwise the image will jut out.
- class
Additional CSS class for the entire box.
- css/style
Additional styling for the entire box.
Examples
Code | Result |
---|---|
{{float file box |[[File:Dye test on Orichalcum armor (Pink Dye).png]] |This very long caption would normally look ''very awkward'' underneath this narrow image of [[Orichalcum armor]] being dyed with [[Pink Dye]]. }} |
|
{{float file box |width=96px |class=note-text |css=border-width:3px;font-style:italic; |title=CSS demo |[[File:Tree.png]]|This is an image of a tree. |[[File:Flower vines.png]]|<!-- no caption --> |[[File:Growing cactus.png]]|This is an image of a cactus. |title7=Stone Block! |[[File:Stone Block.png]] }} |
|
{{float file box |title=Portal sprites |{{inline block|css=width:50%;line-height:2.5|[[File:Return Portal Entrance.gif]]<br/>Entrance}}{{inline block|css=width:50%;line-height:2.5|[[File:Return Portal Exit.gif]]<br/>Exit}} |title2=Minimap icons |{{inline block|css=width:50%;line-height:2.5|[[File:Map Return Portal Entrance.png]]<br/>Entrance}}{{inline block|css=width:50%;line-height:2.5|[[File:Map Return Portal Exit.png]]<br/>Exit}} }} |
|
{{float file box |width=180px |<div style{{=}}"text-align:left;line-height:3.5">[[File:Stardust Dragon minion (1 summon).png|link=]]<br/>[[File:Stardust Dragon minion (2 summons).png|link=]]</div> |Stardust Dragon minion summoned 1 time (top) and 2 times (bottom). }} |
Stardust Dragon minion summoned 1 time (top) and 2 times (bottom). |
{{float file box|width=220px|title=Comparison of block blending|<!-- -->{{inline block|style=vertical-align:top; line-height:unset; max-width:90px; margin-right:10px|[[File:Stone Slab block merging.png]]<br/>Stone Slabs}}<!-- -->{{inline block|style=vertical-align:top; line-height:unset; max-width:90px|[[File:Stone Accent Slab block merging.png]]<br/>Stone Accent Slabs}} }} |
|
{{float file box|width=200px |{{item|mode=image|White Present Slime}} {{item|mode=image|Yellow Present Slime}} {{item|mode=image|Green Present Slime}} {{item|mode=image|Red Present Slime}} |Present Slimes appearing during [[Christmas]] |title3=<nowiki/> |{{item|mode=image|Bunny Slime}} |Slime in [[Bunny]] costume for [[Halloween]] }} |