How to Create an Infobox: Difference between revisions
mNo edit summary |
|||
Line 15: | Line 15: | ||
<td style="border:1px solid blue; "><nowiki>{| class=infobox....|}</nowiki></td> | <td style="border:1px solid blue; "><nowiki>{| class=infobox....|}</nowiki></td> | ||
<td style="border:1px solid blue; "><nowiki><table class=infobox>...</table></nowiki></td> | <td style="border:1px solid blue; "><nowiki><table class=infobox>...</table></nowiki></td> | ||
</tr> | |||
</table> | |||
Next we want to give the infobox some style considerations such as width, borders, padding, font size, and maybe background color: | |||
<table style="width:99%; border:1px solid blue; "> | |||
<tr> | |||
<td style="width:50%; border:1px solid blue; text-align:center; font-size:16pt; ">Wikitext</td> | |||
<td style="width:50%; border:1px solid blue; text-align:center; font-size:16pt; ">HTML</td> | |||
</tr> | |||
<tr> | |||
<td style="border:1px solid blue; "><nowiki>{| class=infobox style="width:30%; text-align:left; padding:0px; font-size:8pt; float:right; border:1px solid black; border-right-width:2px; border-bottom-width:2px; background-color:white;"....|}</nowiki></td> | |||
<td style="border:1px solid blue; "><nowiki><table class=infobox style="width:30%; text-align:left; padding:0px; font-size:8pt; float:right; border:1px solid black; border-right-width:2px; border-bottom-width:2px; background-color:white;">...</table></nowiki></td> | |||
</tr> | </tr> | ||
</table> | </table> |
Revision as of 15:46, 9 September 2014
What are Infoboxes[edit | edit source]
Infoboxes are nothing more than a table saved as a template. However there is one minor difference: the table has a classification in its title, like so in Wikitext:
- {| class=infobox .............. |} or in HTML
- <table class=infobox>.........</table>
This "class=infobox" tells the table to behave like an infobox instead of a regular table and places itself on the right side of the page with a certain width, etc.
So let us create a infobox for an organization. We will do it both in Wikitext and HTML.
Wikitext | HTML |
{| class=infobox....|} | <table class=infobox>...</table> |
Next we want to give the infobox some style considerations such as width, borders, padding, font size, and maybe background color:
Wikitext | HTML |
{| class=infobox style="width:30%; text-align:left; padding:0px; font-size:8pt; float:right; border:1px solid black; border-right-width:2px; border-bottom-width:2px; background-color:white;"....|} | <table class=infobox style="width:30%; text-align:left; padding:0px; font-size:8pt; float:right; border:1px solid black; border-right-width:2px; border-bottom-width:2px; background-color:white;">...</table> |