Template:Floatbox

From Lolitics Wiki
Jump to navigationJump to search

A wrapper template to solve MediaWiki's floating image stacking bug.

Template Usage[edit source]

Floatbox takes two parameters, the floating object you want to obey the normal CSS stacking rules (usually an image), and where you want it to float ("left" or "right"). Since this is mostly an infobox-related problem, you're unlikely to ever need the "left" option.

(Make sure to set the image's own float parameter to none, or it will float to one side of the floatbox.)

You call the template like so:

{{Floatbox|[[File:MediaWiki_for_Beginners.Gove.jpg|thumb|none|200x200px]]|right}}
MediaWiki for Beginners.Gove.jpg

This looks like a standard right-floating image, but it's not- if there were an infobox on the right side of this page it would drift gracefully to the inside.