Difference between revisions of "Template:Seats box"
From Taijitu
(Auto calcs percentage; case for 0 seats) |
(Increased width) |
||
Line 1: | Line 1: | ||
− | {|cellspacing="0" cellpadding="2" style="width: | + | {|cellspacing="0" cellpadding="2" style="width: 12em; height: 1em" |
{{#ifexpr:{{{seats|0}}} = 0|{{!}}align="center" style="background-color: darkgray;"{{!}}0/{{{total|10}}} | {{#ifexpr:{{{seats|0}}} = 0|{{!}}align="center" style="background-color: darkgray;"{{!}}0/{{{total|10}}} | ||
|{{!}}align="center" style="background-color: {{{color}}}; width: {{#expr:{{{seats|0}}} / {{{total}}} * 100}}%"{{!}}{{{seats|0}}} | |{{!}}align="center" style="background-color: {{{color}}}; width: {{#expr:{{{seats|0}}} / {{{total}}} * 100}}%"{{!}}{{{seats|0}}} | ||
{{!}}align="center" style="background-color: darkgray;"{{!}}/{{{total}}}}} | {{!}}align="center" style="background-color: darkgray;"{{!}}/{{{total}}}}} | ||
|} | |} |
Revision as of 15:21, 8 June 2011
0/10 |