Template:Box: Difference between revisions
Appearance
m Updated `margin` specifications. |
m Turned if-statement into ifeq to make all left floats follow `display: inline-block;`. |
||
| Line 1: | Line 1: | ||
{| cellspacing="0" style="width: 238px; background: {{{info-background|#fff}}}; {{# | {| cellspacing="0" style="width: 238px; background: {{{info-background|#fff}}}; {{#ifeq: {{{float|}}} | right | float: right; margin-left: 5px; | display: inline-block; }} border: {{{border-width|1}}}px {{{border-style|solid}}} {{{border-color|#000}}};" | ||
| style="width: 45px; height: 45px; background: {{{logo-background|#ccc}}}; text-align: center; font-size: {{{logo-size|{{{5|12}}}}}}pt; color: {{{logo-color|#000}}};" | '''{{{logo}}}''' | | style="width: 45px; height: 45px; background: {{{logo-background|#ccc}}}; text-align: center; font-size: {{{logo-size|{{{5|12}}}}}}pt; color: {{{logo-color|#000}}};" | '''{{{logo}}}''' | ||
| style="font-size:{{{info-size|8}}}pt; padding:4pt; line-height:1.25em; color:{{{info-color|#000}}};" | {{{info-text}}} | | style="font-size:{{{info-size|8}}}pt; padding:4pt; line-height:1.25em; color:{{{info-color|#000}}};" | {{{info-text}}} | ||
Latest revision as of 17:55, 13 October 2020
| {{{logo}}} | {{{info-text}}} |
| Template:Box is deprecated. |
The Box template is a template used to generate a customizable userbox. All parameters are optional, except for logo and info-text.
Parameters
Info
info-text- the userbox's main textinfo-background- the color of the userbox (white by default)info-size- the size of the userbox's text in points, written in the form of an integer (8 by default)info-color- the userbox's text color color (black by default)
Border
border-width- the width of the userbox's border in pixels, written in the form of an integer (1 by default}border-style- sets the userbox's border style (solid by default)border-color- sets the userbox's border color (black by default)
Logo
logo- the userbox's logo, seen to the left. May be an image or text.logo-background- the logo's background color (gray by default)logo-size- the logo's size in points, written in the form of an integer (12 by default. Use only for text logos - if the logo is an image, specify the size in pixels like in the examples below.)logo-color- the logo's color (black by default)
Other
float- sets the userbox's float css property. (unassigned by default withdisplay: inline-block;set instead)
Examples
For more examples of userboxes that use this template, see Category:User Templates.