How to Create a Navbox
Navboxes are nothing more than a table saved as a template. Navboxes are usually at the bottom of the article and usually only contain links to topics or locations. See the example at the bottom of this article.
Again an Navbox is a table. If you know how to create tables in Wikitext or HTML, it is not difficult. If you do not know Wikitext or HTLM, you will probably need someone who does to help you. If you would like to learn these two programs, see Wikitext or HTML Programming. Neither of these programming languages are difficult.
Step One - Create the table
- We are going to assume you know a little Wikitext and HTML in this tutorial. We will begin by creating a simple table. The coding will be displayed in both Wikitext and HTML side by side so can see the difference.
- 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.
Links to {{{name}}} - related articles | |
- It does not look like much because you still have fill it in with the links or other information that you may want to display for your readers.
- Here is the coding in HTML and Wikitext for the above Navbox:
Wikitext | HTML |
{| style="width:100%; border:1px solid blue; background-color:{{{navbox background color}}}; border-collaspe:separate; border-spacing:5px; "> |
<table style="width:100%; border:1px solid blue; background-color:{{{navbox background color}}}; border-collaspe:separate; border-spacing:5px; "> |
- Since navboxes usually extend from one side to the other, we have set the width for our navbox to 100%.
- Since the name of the organization and the image will extend over the two columns which contain the information about the organization we will install colspan="2" in the organization and image coding.
- When you save your navbox be sure include the word "navbox" in the title so people will know what kind of template it is for example: {{template:infobox sample}}.
Step Two - Create the template
- Since there is only one way to create a template in the Wiki, we will only show the Wikitext coding:
{{Navbox name |