How to Create an Infobox: Difference between revisions

m
Line 16: Line 16:
*For this lesson, we have set the width for our infobox to 200 pixels.  It could be any width, but infoboxes are usually kept thin and 200 pixels is about right.
*For this lesson, we have set the width for our infobox to 200 pixels.  It could be any width, but infoboxes are usually kept thin and 200 pixels is about right.
*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 an infobox as shown above.  So let us create a infobox for an organization:
*We will be creating an infobox as shown above.  We will include a border and float it on the right side.
So let us create a infobox for an organization:
<table style="border:1px solid blue; ">
<table style="border:1px solid blue; ">
<tr>
<tr>
Line 24: Line 25:
<tr>
<tr>
<td style="border:1px solid blue; ">
<td style="border:1px solid blue; ">
<nowiki>{| class="infobox"</nowiki> style="width:200px;" <br>
<nowiki>{|</nowiki> style="width:200px; border:1px solid black; float:right; " <br>
<nowiki>|-</nowiki><br>
<nowiki>|-</nowiki><br>
<nowiki>|colspan="2" style="background-color:yellow;"|organization</nowiki><br><br>
<nowiki>|colspan="2" style="background-color:yellow;"|organization</nowiki><br><br>
Line 45: Line 46:


<td style="border:1px solid blue; ">
<td style="border:1px solid blue; ">
<nowiki><table class="infobox" style="width:200px;"></nowiki><br>
<nowiki><table style="width:200px; border:1px solid black; float:right; "></nowiki><br>
<nowiki><tr></nowiki><br>
<nowiki><tr></nowiki><br>
<nowiki><td colspan="2"></nowiki>organization<nowiki></td></nowiki><br>
<nowiki><td colspan="2"></nowiki>organization<nowiki></td></nowiki><br>