Difference between revisions of "Template:Cc"

From Data JW United
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to create a container of a certain width. {| class="wikitable" |- ! Code !! Example !! Result |- | <code><nowiki>{{raw:data:cs|10|element}}</...")
 
Line 6: Line 6:
 
|-
 
|-
 
| <code><nowiki>{{raw:data:cs|10|element}}</nowiki></code> || <code><nowiki>{{raw:data:cs|10|actual text}}</nowiki></code> || <div style="width:400px;">{{cs|65|actual text}} (container is 65px width)</div>
 
| <code><nowiki>{{raw:data:cs|10|element}}</nowiki></code> || <code><nowiki>{{raw:data:cs|10|actual text}}</nowiki></code> || <div style="width:400px;">{{cs|65|actual text}} (container is 65px width)</div>
 +
|-
 +
| <code><nowiki>{{raw:data:cs|c|10|element}}</nowiki></code> || <code><nowiki>{{raw:data:cs|c|10|actual text}}</nowiki></code> || <div style="width:400px;">{{cs|c|65|actual text}}</div>
 
|}
 
|}
 
</noinclude>
 
</noinclude>
 
<includeonly>
 
<includeonly>
<div style="width:{{{1}}}px;">{{{2}}}</div>
+
{{#ifeq: {{{1}}} |c| <div style="margin:0 auto;width:{{{2}}}px;">{{{3}}}</div> | <div style="width:{{{1}}}px;">{{{2}}}</div>}}
 
</includeonly>
 
</includeonly>

Revision as of 07:03, 1 October 2020

This template is used to create a container of a certain width.

Code Example Result
{{raw:data:cs|10|element}} {{raw:data:cs|10|actual text}}
Template:Cs (container is 65px width)
{{raw:data:cs|c|10|element}} {{raw:data:cs|c|10|actual text}}