Jump to content

How to Create a Navbox: Difference between revisions

m
Line 10: Line 10:
*It is recommended that you create infobox tables in HTML as there fewer problems as you will see.
*It is recommended that you create infobox tables in HTML as there fewer problems as you will see.
*We will be creating a navbox as shown below.  
*We will be creating a navbox as shown below.  
<table="border:1px solid black; width:100%; ">
<table style="border:1px solid black; width:100%; ">
<tr>
<tr>
<td style="width:50%; border:1px solid black; ">
<td style="width:50%; border:1px solid black; ">
<nowiki><table style="width:100%; border:1px solid blue; background-color:{{{navbox background color}}}; border-collaspe:separate; border-spacing:5px; "></nowiki><br>
<nowiki>{| style="width:100%; border:1px solid blue; background-color:{{{navbox background color}}}; border-collaspe:separate; border-spacing:5px; "></nowiki><br>
<nowiki><tr></nowiki><br>
<nowiki>|-</nowiki>
<nowiki><td colspan="2" style="text-align:center; background-color:{{{title background color}}}; ">Links to {{{name}}} - related articles</nowiki><br>
 
<nowiki></td></nowiki><br>
<nowiki>| colspan="2" style="text-align:center; background-color:{{{title background color}}}; ">Links to {{{name}}} - related articles</nowiki><br>
<nowiki></tr></nowiki><br>
 
<nowiki><tr></nowiki><br>
<nowiki>{{#if:{{Ifempty|{{{group title1|}}}}}|</nowiki>
<nowiki>{{#if:{{Ifempty|{{{group title1|}}}}}|
<nowiki>| style="text-align:right; width:15%; background-color:{{{left column background color}}}; ">'''{{{group title1}}}'''|}}</nowiki><br>
<td style="text-align:right; width:15%; background-color:{{{left column background color}}}; ">'''{{{group title1}}}'''|}}</nowiki><br>
<nowiki>{{#if:{{Ifempty|{{{group title1-item1|}}}}}|</nowiki>
<nowiki>{{#if:{{Ifempty|{{{group title1-item1|}}}}}|</nowiki>
<nowiki><td style="text-align:left; background-color:{{{right column background color}}}; ">
<nowiki>| style="text-align:left; background-color:{{{right column background color}}}; ">
{{#if:{{{group title1-item1|}}}|{{{group title1-item1}}}{{·}}|}} {{#if:{{{group title1-item2|}}}|{{{group title1-item2}}}{{·}}|}} {{#if:{{{group title1-item3|}}}{{·}}|{{{group title1-item3}}}{{·}}|}} {{#if:{{{group title1-item4|}}}|{{{group title1-item4}}}{{·}}|}} {{#if:{{{group title1-item5|}}}|{{{group title1-item5}}}{{·}}|}}|}}</nowiki><br>
{{#if:{{{group title1-item1|}}}|{{{group title1-item1}}}{{·}}|}} {{#if:{{{group title1-item2|}}}|{{{group title1-item2}}}{{·}}|}} {{#if:{{{group title1-item3|}}}{{·}}|{{{group title1-item3}}}{{·}}|}} {{#if:{{{group title1-item4|}}}|{{{group title1-item4}}}{{·}}|}} {{#if:{{{group title1-item5|}}}|{{{group title1-item5}}}{{·}}|}}|}}</nowiki><br><br>
<nowiki></tr></nowiki><br>
 
<nowiki></table></nowiki><br>
<nowiki>|}</nowiki><br>
</td>
</td>
<td style="width:50%; border:1px solid black; ">
<td style="width:50%; border:1px solid black; ">
Interface administrators, smwadministrator, smwcurator, smweditor
82,369

edits