How to Create an Infobox: Difference between revisions

From FamilySearch Wiki
Line 7: Line 7:


So let us create a infobox for an organization.  We will do it both in Wikitext and HTML.
So let us create a infobox for an organization.  We will do it both in Wikitext and HTML.
<div style="position:relative; ">
<table style="width:99%; ">
<div style="position:absolute; top:0px; left:0px; width:45%; ">First line:
<tr>
<nowiki>{| class=infobox
<td style="width:50%; "><nowiki>{| class=infobox |}</td>
 
<td style="width:50%; "><nowiki><table class=infobox></td>
|}</nowiki>
</tr>
</div>
</table>
</div>

Revision as of 15:30, 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.

<nowiki>{| class=infobox |} <nowiki>