User:Ganaram inukshuk/Sandbox: Difference between revisions
→Navbox: previous navbox had a div for the header and a separate table for the content; new navbox no longer needs this separation |
|||
Line 5: | Line 5: | ||
=== Base navbox === | === Base navbox === | ||
'''Base navbox''' | '''Base navbox with no special features''' | ||
<div class="wikitable mw-collapsible mw-collapsed" style=" | <div class="wikitable"> | ||
<table class="mw-collapsible mw-collapsed nowraplinks" style="width: 100%; border-spacing:0px"> | |||
<tr> | |||
<th style="width:5%; text-align:center; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white" colspan="2"><b>Navbox Header</b></th> | |||
</tr> | |||
<tr> | <tr> | ||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | <th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | ||
Line 18: | Line 20: | ||
<tr> | <tr> | ||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Another Category</th> | <th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Another Category</th> | ||
<td style="padding:0em"> | |||
<div style="padding:0.25em 0.5em">Content</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Yet Another Category</th> | |||
<td style="padding:0em"> | <td style="padding:0em"> | ||
<div style="padding:0.25em 0.5em">Content</div> | <div style="padding:0.25em 0.5em">Content</div> | ||
Line 23: | Line 31: | ||
</tr> | </tr> | ||
</table> | </table> | ||
</div> | </div> | ||
'''Navbox with headerless rows''' | '''Navbox with headerless rows''' | ||
<div class="wikitable mw-collapsible mw-collapsed" style=" | <div class="wikitable"> | ||
<table class="mw-collapsible mw-collapsed nowraplinks" style="width: 100%; border-spacing:0px"> | |||
<tr> | |||
<th style="width:5%; text-align:center; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white" colspan="2"><b>Navbox Header</b></th> | |||
</tr> | |||
<tr> | <tr> | ||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | <th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | ||
Line 49: | Line 58: | ||
</tr> | </tr> | ||
</table> | </table> | ||
</div> | </div> | ||
'''Navbox with nested categories''' | '''Navbox with nested categories''' | ||
<div class="wikitable mw-collapsible mw-collapsed" style=" | Note: normal row content is placed in a div; subcategories do not need this div. | ||
<div class="wikitable"> | |||
<table class="mw-collapsible mw-collapsed nowraplinks" style="width: 100%; border-spacing:0px"> | |||
<tr> | |||
<th style="width:5%; text-align:center; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white" colspan="2"><b>Navbox Header</b></th> | |||
</tr> | |||
<tr> | <tr> | ||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | <th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Main Category</th> | ||
<td style="padding:0em"> | |||
<div style="padding:0.25em 0.5em">Content</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Another Category</th> | |||
<td style="padding:0em"> | |||
<div style="padding:0.25em 0.5em">Content</div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Category with Subcategories</th> | |||
<td style="padding:0em"> | <td style="padding:0em"> | ||
<table style="width:100%; border-spacing:0px"> | <table style="width:100%; border-spacing:0px"> | ||
Line 68: | Line 92: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<th style="width:5%; text-align:right; background-color:#eaecf0; white-space:nowrap; padding:0.25em 0.5em; border:1px solid white">Subcategory 2</th> | |||
<td style="padding:0em"> | <td style="padding:0em"> | ||
<div style="padding:0.25em 0.5em">Content 2</div> | <div style="padding:0.25em 0.5em">Content 2</div> | ||
Line 74: | Line 98: | ||
</tr> | </tr> | ||
</table> | </table> | ||
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
</div> | </div> | ||