Template:Battle: Difference between revisions

Jump to navigation Jump to search
No edit summary
RS David (talk | contribs)
cat fix
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="infobox">
<div class="infobox">
<div class="header">'''{{{name}}}'''</div>
<div class="header">'''{{{name}}}'''</div>
<div class="image">{{{image}}}</div>
<div class="vborder">'''Conflict''': {{{conflict}}}</div>
<div class="vborder">'''Conflict''': {{{conflict}}}</div>
<div>'''Date''': {{{date}}}</div>
<div>'''Date''': {{{date}}}</div>
Line 6: Line 7:
<div>'''Outcome''': {{{result}}}</div>
<div>'''Outcome''': {{{result}}}</div>
<div class="subheader vborder">'''Combatants'''</div>
<div class="subheader vborder">'''Combatants'''</div>
<div class="lefthalf centered">{{{side1}}}</div>
<table cellspacing="0"><tr><td class="left centered">{{{side1}}}</td>
<div class="righthalf centered">{{{side2}}}</div>
<td class="centered">{{{side2}}}</td></tr></table>
<div class="subheader vborder">'''Commanders'''</div>
<div class="subheader vborder">'''Commanders'''</div>
<div class="lefthalf">{{{commanders1}}}</div>
<table cellspacing="0"><tr><td class="left">{{{commanders1}}}</td>
<div class="righthalf">{{{commanders2}}}</div>
<td>{{{commanders2}}}</td></tr></table>
<div class="subheader vborder">'''Strength'''</div>
<div class="subheader vborder">'''Strength'''</div>
<div class="lefthalf">{{{forces1}}}</div>
<table cellspacing="0"><tr><td class="left">{{{forces1}}}</td>
<div class="righthalf">{{{forces2}}}</div>
<td>{{{forces2}}}</td></tr></table>
<div class="subheader vborder">'''Casualties'''</div>
<div class="subheader vborder">'''Casualties'''</div>
<div class="lefthalf">{{{casual1}}}</div>
<table cellspacing="0"><tr><td class="left">{{{casual1}}}</td>
<div class="righthalf">{{{casual2}}}</div>
<td>{{{casual2}}}</td></tr></table>
</div>
</div>
<noinclude>
<noinclude>
Line 41: Line 42:
</pre>
</pre>


== Bugs ==
== Display issues ==
In dual-column entries, such as side1 and side2, the divs are not quite correct.  The only way to solve this appears to be by using tablesAs tables are often the devil in design, this has been avoided for now; however, it will likely be fixed soon unless a div-ly solution presents itself.  For now, simply ignore the strange display issues :)
* Opera: Template renders perfectly.
* Firefox: In two-column rows, e.g. "Combatants", the cells vary in size instead of staying 150 pixels wide like they are told to, when the template is actually usedThis is a minor issue but it results in imperfectly aligned center borders.
* Internet Explorer: Interestingly enough, template renders perfectly in IE7.  For once it's only Firefox that's screwed. My world is upside down.
 
[[Category:Infobox templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 20:46, 31 May 2010

{{{name}}}
{{{image}}}
Conflict: {{{conflict}}}
Date: {{{date}}}
Place: {{{place}}}
Outcome: {{{result}}}
Combatants
{{{side1}}} {{{side2}}}
Commanders
{{{commanders1}}} {{{commanders2}}}
Strength
{{{forces1}}} {{{forces2}}}
Casualties
{{{casual1}}} {{{casual2}}}

Use this template as a battle infobox. For an example, see Battle of Blerthmore.

Code for inclusion:

{{battle|
name=|
conflict=|
date=|
place=|
result=|
side1=|
side2=|
commanders1=|
commanders2=|
forces1=|
forces2=|
casual1=|
casual2=
}}

Display issues

  • Opera: Template renders perfectly.
  • Firefox: In two-column rows, e.g. "Combatants", the cells vary in size instead of staying 150 pixels wide like they are told to, when the template is actually used. This is a minor issue but it results in imperfectly aligned center borders.
  • Internet Explorer: Interestingly enough, template renders perfectly in IE7. For once it's only Firefox that's screwed. My world is upside down.