Template:Float style

Jump to navigation Jump to search

float: right; clear: right;

Template documentation

This helper template may be used by sidebar, infobox, and image templates to generate the style statements for controlling float behaviour.

Examples

style="{{float style}}" → style="float: right; clear: right;"

style="{{float style|right}}" → style="float: right; clear: right;"

style="{{float style|left}}" → style="float: left; clear: left;"

style="{{float style|center}}" → style="float: none; clear: both; margin-left: auto; margin-right: auto;"

style="{{float style|both}}" → style="float: none; clear: both; margin-left: auto; margin-right: auto;"

style="{{float style|none}}" → style="float: none; clear: none;"

style="{{float style|margin=1em}}" → style="float: right; clear: right; margin: 0 0 1em 1em;"

style="{{float style|right|margin=1em}}" → style="float: right; clear: right;"

style="{{float style|left|margin=1em}}" → style="float: left; clear: left; margin: 0 1em 1em 0;"

style="{{float style|center|margin=1em}}" → style="float: none; clear: both; margin-left: auto; margin-right: auto;"

style="{{float style|both|margin=1em}}" → style="float: none; clear: both; margin-left: auto; margin-right: auto;"

style="{{float style|none|margin=1em}}" → style="float: none; clear: none; margin: 0 0 1em 1em;"