Difference between revisions of "Template:Ubx"

From YTMND
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
<div style="float: left; border: solid {{{border|black}}} 1px; margin: 1px;">
+
<div style="float: {{{1|left}}}; border: solid {{{border|black}}} 1px; margin: 1px;">
{|cellspacing="0" style="width: 238px; background: {{{bkgnd}}};"
+
{|cellspacing="0" style="width: 238px; background: {{{bkgnd|#FFFFFF}}};"
|style="width: 45px; height: 45px; background: {{{sidetextbkgnd}}}; text-align: center;"| '''<big>{{{sidetext}}}</big>'''
+
|style="width: 45px; height: 45px; background: {{{sidetextbkgnd|#FFFFFF}}}; text-align: center;"| '''<big>{{{sidetext}}}</big>'''
|style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: {{{textclr|black}}};"| {{{text}}}
+
|style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: {{{textclr|black}}}; text-align: {{{align|left}}};"| {{{text}}}
 
|}</div><noinclude>
 
|}</div><noinclude>
 
__NOTOC__
 
__NOTOC__
  
 
==Code==
 
==Code==
<pre><nowiki>{{ ubx
+
<pre><nowiki>{{ubx
| text          =  
+
| text          =  
| bkgnd        =  
+
| bkgnd        =  
| sidetext      =  
+
| sidetext      =  
| sidetextbkgnd =  
+
| sidetextbkgnd =  
| textclr      =  
+
| textclr      =  
| border        =  
+
| border        =
 +
| float        =
 +
| align        =  
 
}}</nowiki></pre>
 
}}</nowiki></pre>
 
===Parameters===
 
===Parameters===
Line 22: Line 24:
 
*'''Textclr''' - Text colour.
 
*'''Textclr''' - Text colour.
 
*'''Border''' - Border colour
 
*'''Border''' - Border colour
 +
*'''Float''' - In what direction the box should float, left by default
 +
*'''Align''' - Text align
 
==Example==
 
==Example==
 
<pre><nowiki>
 
<pre><nowiki>
 
{{ ubx
 
{{ ubx
  | text          = <center>Hey w00t!</center>
+
  | text          = Example
 
  | bkgnd        = #bbbbcc
 
  | bkgnd        = #bbbbcc
  | sidetext      = [[image:wiki.gif|45px]]!
+
  | sidetext      = [[image:wiki.gif|45px]]
 
  | sidetextbkgnd = #ffffff
 
  | sidetextbkgnd = #ffffff
 
  | textclr      = #012345
 
  | textclr      = #012345
 
  | border        = blue
 
  | border        = blue
 +
| float        = left
 +
| align        = right
 
}}</nowiki></pre> would give you:
 
}}</nowiki></pre> would give you:
 
{{ ubx
 
{{ ubx
  | text          = <center>Hey w00t!</center>
+
  | text          = Example
 
  | bkgnd        = #bbbbcc
 
  | bkgnd        = #bbbbcc
  | sidetext      = [[image:wiki.gif|45px]]!
+
  | sidetext      = [[image:wiki.gif|45px]]
 
  | sidetextbkgnd = #ffffff
 
  | sidetextbkgnd = #ffffff
 
  | textclr      = #012345
 
  | textclr      = #012345
 
  | border        = blue
 
  | border        = blue
 +
|float=left
 +
|align=right
 
}}
 
}}
 
Test your userboxes in the [[Y:SBX|sandbox]].
 
Test your userboxes in the [[Y:SBX|sandbox]].
 
[[Category:User page templates| Userbox]]</noinclude>
 
[[Category:User page templates| Userbox]]</noinclude>

Latest revision as of 12:12, January 24, 2007

{{{sidetext}}} {{{text}}}


Code

{{ubx
| text          = 
| bkgnd         = 
| sidetext      = 
| sidetextbkgnd = 
| textclr       = 
| border        = 
| float         = 
| align         = 
}}

Parameters

  • Text - The text at the right.
  • Bkgnd - The background colour.
  • Sidetext - The image/text at the left. If you're using images, they should always be about 45 pixles! ([[Image:Whatever.gif|45px]])
  • Sidetextbkgnd - The background for the text at the left.
  • Textclr - Text colour.
  • Border - Border colour
  • Float - In what direction the box should float, left by default
  • Align - Text align

Example

{{ ubx
 | text          = Example
 | bkgnd         = #bbbbcc
 | sidetext      = [[image:wiki.gif|45px]]
 | sidetextbkgnd = #ffffff
 | textclr       = #012345
 | border        = blue
 | float         = left
 | align         = right
}}
would give you:
Wiki.gif Example

Test your userboxes in the sandbox.