Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
 
No edit summary
 
Line 1: Line 1:
== Template ==
+
== Licensing ==
  +
{{Licensing|Mob}}
;Description
 
:Creates a table cell with a "3D" effect using CSS. The first four fields, if supplied, set the highlight, background, shadow, and text colors (defaults to white text on dark grey). The height= and depth= parameters, if present, set how far "out" the cell appears to protrude (i.e. sets the border width). If both are provided, only height= is used. Additional CSS can be applied using the optional css= parameter. Additional HTML attributes can be specified with the optional attr= parameter. Text alignment can be specified using the align= parameter.
 
 
:This template also supports a "join" effect, allowing cells to remain formatted in discrete columns but appear as if a colspan= had been applied. Three options are available for the join= parameter: left (connect to the cell to the left), right (connect to the cell on the right) and both (connect to the cells both on the left and the right).
 
 
:A {{t|3D Table}} template is provided for use with 3D cells, but isn't strictly necessary. A "lowered" effect (as opposed to the default "raised" effect) can be achieved by specifying the shadow color first, then the background color, and the highlight color last.
 
;Syntax
 
:{{t|3D Cell|highlight|background|shadow|color|height=|depth=|css=|attr=|align=|join=}}
 
;Example
 
<nowiki>{{3D Table|css=border-top-width: 0;}}
 
| style="text-align:center;font-weight:bold" colspan="2" | Example
 
|-
 
{{3D Cell|height=2px}} A cell with some text in it.
 
{{3D Cell|height=2px}} A second cell.
 
|-
 
{{3D Cell|height=2px|join=right}} Two cells
 
{{3D Cell|height=2px|join=left}} joined together.
 
|}</nowiki>
 
;Result
 
{{3D Table|css=border-top-width: 0;}}
 
| style="text-align:center;font-weight:bold" colspan="2" | Example
 
|-
 
{{3D Cell|height=2px}} A cell with some text in it.
 
{{3D Cell|height=2px}} A second cell.
 
|-
 
{{3D Cell|height=2px|join=right}} Two cells
 
{{3D Cell|height=2px|join=left}} joined together.
 
|}
 
 
<includeonly><onlyinclude>| style="background-color: {{{2|#444}}}; border-style: solid; border-color: {{{1|#555}}} {{{3|#333}}} {{{3|#333}}} {{{1|#555}}}; border-width: {{{height|{{{depth|1px}}}}}} {{#ifeq:{{{join|left}}}|left|{{{height|{{{depth|1px}}}}}}|0}} {{{height|{{{depth|1px}}}}}} {{#ifeq:{{{join|right}}}|right|{{{height|{{{depth|1px}}}}}}|0}}; color: {{{4|inherit}}}; padding: 0 0.{{#ifeq:{{{join|left}}}|left||2}}5em 0 0.{{#ifeq:{{{join|right}}}|right||2}}5em; text-align: {{{align|left}}};{{{css|}}}" {{{attr|}}} |</onlyinclude></includeonly>
 
 
[[Category:WoW table helper templates]]
 

Revision as of 22:49, 3 February 2011

Licensing