Stampa:Userbox/doc

Nga Wikipedia, enciklopedia e lirë

Përdorimi[Redakto nëpërmjet kodit]

Code Result
{{userbox}}
{{{info}}}
{{userbox
| border-c      = #aaffaa
| border-s      = 2
| id            = foo
| id-c          = #ffffee
| id-s          = 20
| info          = ''foo bar''
| info-c        = #ffeeff
| info-s        = 12
}}
foofoo bar
Below example shows the default appearance of a userbox, which is (much) higher than the 45px. Compare the height of the one below with the above userbox.
{{userbox
| border-c      = #aaffaa
| border-s      = 2
| id            = foo logo
| id-c          = #ffffee
| info          = ''We are trying to see 
default distance in between text 
lines, see the distance in 
between cell content and its border, 
and also see total height.''
| info-c        = #ffeeff
}}
foo logoWe are trying to see default distance in between text lines, see the distance in between cell content and its border, and also see total height.
Below example shows how we can change that userbox and further specify parameters to bring down the overall height of the userbox to the recommended height of 45px, even with four text lines. Cell padding parameter "info-p" can also be set at "1pt 1pt 1pt 2pt", or "1pt 2pt" for better appearance, when there are 4 text lines.
{{userbox
| border-c      = #aaffaa
| border-s      = 1
| id            = foo logo
| id-c          = #ffffee
| id-lh         = 1.1em
| id-s          = 14
| info          = ''We have specified values 
to lessen the distance in between 
text lines & padding space in between 
cell content and its border.''
| info-c        = #ffeeff
| info-lh       = 1.05em
| info-p        = 1pt
| info-s        = 8
}}
foo logoWe have specified values to lessen the distance in between text lines & padding space in between cell content and its border.
Below example is for advanced users, showing how we can specify other CSS properties, for example, "font-family", to change the font or "font-weight" to change the boldface from the default. Below, on the right side are two userboxes: the top one is displayed without the "font-family" or "font-weight" parameters; and the bottom userbox is displayed by using the below code, with the help of the "info-op" field.
{{userbox
| border-c      = #afa
| border-s      = 2
| id            = foo logo
| id-c          = #ffe
| id-lh         = 1.1em
| id-s          = 14
| info          = foo bar
| info-c        = #fef
| info-op       = font-family: 'Courier New'; font-weight: 700;
| info-s        = 14
}}
foo logofoo bar

 
foo logofoo bar

Shiko edhe[Redakto nëpërmjet kodit]