Template:Table: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Deprecated features have been removed)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Doc}}
{{Doc}}
<includeonly><onlyinclude><table {{#if:{{{id|}}}|id="{{{id|}}}"|}} class="plainlinks {{{class|}}}" cellpadding="{{{cellpadding|4px}}}" {{#if:{{{cellspacing|}}}|cellspacing="{{{cellspacing}}}"}} style="{{#if:{{{width|}}}|width:{{{width}}};}} background:{{{bgcolor|#202020}}}; border:2px solid #525252; border-radius:{{{radius|6px}}}; {{#if:{{{font-size|}}}|font-size:{{{font-size}}};}} {{#if:{{{align|}}}|margin:{{#switch:{{{align}}}|center=auto|right=0 0 0 auto}};}} {{{style|}}}">
<includeonly><onlyinclude><table {{#if:{{{id|}}}|id="{{{id|}}}"|}} class="plainlinks {{{class|}}}" cellpadding="{{{cellpadding|4px}}}" {{#if:{{{cellspacing|}}}|cellspacing="{{{cellspacing}}}"}} style="{{#if:{{{width|}}}|width:{{{width}}};}} background:{{{bgcolor|#202020}}}; border:2px solid #525252; border-radius:{{{radius|6px}}}; {{#if:{{{font-size|}}}|font-size:{{{font-size}}};}} {{#if:{{{align|}}}|margin:{{#switch:{{{align}}}|center=auto|right=0 0 0 auto}};}} {{{style|}}}"><!--


{{#if:{{{caption|}}}|<caption style="{{#if:{{{caption indent|}}}|margin:{{{caption indent|}}};|}} {{#if:{{{caption indent:top|}}}|margin-top:{{{caption indent:top|}}};|}} {{#if:{{{caption indent:right|}}}|margin-rght:{{{caption indent:right|}}};|}} {{#if:{{{caption indent:bottom|}}}|margin-bottom:{{{caption indent:bottom|}}};|}} {{#if:{{{caption indent:left|}}}|margin-left:{{{caption indent:left|}}};|}}">{{{caption|}}}</caption>|}}
-->{{#if:{{{caption|}}}|<caption style="{{#if:{{{caption indent|}}}|margin:{{{caption indent|}}};|}} {{#if:{{{caption indent:top|}}}|margin-top:{{{caption indent:top|}}};|}} {{#if:{{{caption indent:right|}}}|margin-rght:{{{caption indent:right|}}};|}} {{#if:{{{caption indent:bottom|}}}|margin-bottom:{{{caption indent:bottom|}}};|}} {{#if:{{{caption indent:left|}}}|margin-left:{{{caption indent:left|}}};|}}">{{{caption|}}}</caption>|}}<!--


{{{1|}}}
-->{{{1|}}}<!--


</table>}}</onlyinclude></includeonly>
--></table></onlyinclude></includeonly>

Latest revision as of 07:41, 15 June 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Adds a table, but actually adds a table.

Parameters and Examples

Parameter Description Example
{{{1}}} or {{{text}}} Your text.
{{Table|Hello, World!}}
{{Table|text = Hello, World!}}

Elements

{{{caption}}} Table caption.
{{Table|caption = Hello, World!}}

Attributes

{{{id}}} Element ID. Useful for linking to a specific part of the page.
{{Table|id = my_id}}
[[My Sweet Page#my_id|My sweet page]]
{{{class}}} Custom HTML class.
{{Table|class = myClass}}
{{{style}}} Custom CSS.
{{Table|style = background-image:linear-gradient(0deg, white, black)}}

Style

{{{caption indent}}} Indentation of the caption from all sides.
{{Table|caption indent = 1em 2em 3em 4em}}
{{{caption indent:top}}} Indentation of the caption at the top
{{Table|caption indent:top = 1em}}
{{{caption indent:right}}} Indentation of the caption on the right.
{{Table|caption indent:right = 2em}}
{{{caption indent:bottom}}} Indentation of the caption at the bottom.
{{Table|caption indent:bottom = 3em}}
{{{caption indent:left}}} Indentation of the caption on the left.
{{Table|caption indent:left = 4em}}
{{{width}}} The width of the cell.
{{Table|width = 30%}}
{{{bgcolor}}} Background color.
{{Table|bgcolor = rgb(255 255 255)}}
{{{radius}}} The radius of the cell border.
{{Table|radius = 8px 2px 4px 8px}}
{{{align}}} Table alignment. Available values:
  • center
  • right
{{Table|align = right}}
{{{font-size}}} Font size.
{{Table|font-size = 1.5em}}

Ready-made table code

{{Table | align = center | caption = <span style="user-select:none"> [[File:ValveEmployee.png|link = Valve]] </span> | caption indent:bottom = 1em | {{tr | {{th|radius=3px 0 0 0| Header 1 }} {{th| Header 2 }} {{th|radius=0 3px 0 0| Header 3 }} }} {{tr | {{td| Cell 1 }} {{td| Cell 2 }} {{td|rowspan=2| Cell 3 }} }} {{tr | {{td|colspan=2|bgcolor=#303030| Cell 4 }} }} {{tr | {{td|radius=0 0 0 3px| Cell 6 }} {{td|colspan=2|bgcolor=#303030|radius=0 0 3px 0| Cell 7 }} }} }}