Template:Wiki/style both: Difference between revisions

From TerraFirmaCraft Plus Wiki
Jump to navigation Jump to search
Kittychanley (talk | contribs)
Created page with "{{#if: {{lc: {{{title||yes}}} }} | <div style="width:900px; margin:0 auto; background-color: #fcfcfc; border: 1px solid #ccc; border-bottom: 5px groove #999999; border-right:5..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{#if: {{lc: {{{title||yes}}} }} | <div style="width:900px; margin:0 auto; background-color: #fcfcfc; border: 1px solid #ccc; border-bottom: 5px groove #999999; border-right:5px groove #999999; text-align: center; padding: 0.4em;"> |
<includeonly>{{#if: {{lc: {{{title||yes}}} }} | <div style="width:900px; margin:0 auto; background-color: #fcfcfc; border: 1px solid #ccc; border-bottom: 5px groove #999999; border-right:5px groove #999999; text-align: center; padding: 0.4em;"> |
{{!}} rowspan="{{{rowspan|2}}}" colspan="{{{colspan|2}}" style="background: #FCFCFC; border: 1px solid #ccc; vertical-align: top; {{{css|width: 33%;}}}" {{!}}
{{!}} rowspan="{{{rowspan|2}}}" colspan="{{{colspan|2}}}" style="background: #FCFCFC; border: 1px solid #ccc; vertical-align: top; {{{css|width: 33%;}}}" {{!}}
<div class="mcwiki-header" style="margin: 3px; font-weight: bold; text-align: center; font-size: 120%; {{{headercss|}}}">{{#if: {{{image|}}} | <div style="float: right;">[[Image:{{{image|}}} {{!}}48px {{#if: {{{link|}}} | {{!}}link={{{link|}}} }}]]</div> }} {{{header}}}</div>
<div class="mcwiki-header" style="margin: 3px; font-weight: bold; text-align: center; font-size: 120%; {{{headercss|}}}">{{#if: {{{image|}}} | <div style="float: right;">[[Image:{{{image|}}} {{!}}48px {{#if: {{{link|}}} | {{!}}link={{{link|}}} }}]]</div> }} {{{header}}}</div>
<div style="padding: 0em 1em;"> }}
<div style="padding: 0em 1em;"> }}
{{{content}}}
{{{content}}}
{{#if: {{lc: {{{title||yes}}} }} | </div><br /> | </div> }}<noinclude>
{{#if: {{lc: {{{title||yes}}} }} | </div><br /> | </div> }}</includeonly><noinclude>
{{/doc}}
[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Latest revision as of 14:58, 7 November 2021

This template generates a table row/"block" that is used for formatting on main pages such as Main Page. Template:Wiki/style both is used when you want a table row that covers two columns, and Template:Wiki/style is used when you want a table row that covers only 1 column.

The fact that the templates are called Wiki/style_both and Wiki/style are probably a vestige of a time when the main page covered two columns, or from the wiki where these templates were imported from. Right now, it covers three columns, so my standard is to set the colspan manually on every table "row"/"block", for clarity.