Difference between revisions of "Template:Infobox"
From LFS Manual
Jump to navigationJump to search (Created page with "<table style=" border: 1px solid #a2a9b1; border-spacing: 3px; background-color: #f8f9fa; color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em;...") |
|||
| Line 8: | Line 8: | ||
float: right; | float: right; | ||
clear: right; | clear: right; | ||
| − | font-size: | + | font-size: 100%; |
line-height: 1.5em; | line-height: 1.5em; | ||
width: 22em; | width: 22em; | ||
| Line 18: | Line 18: | ||
padding: 0.2em; | padding: 0.2em; | ||
">{{{title}}}</caption> | ">{{{title}}}</caption> | ||
| + | <tr> | ||
| + | <th colspan="2" style="text-align: center; font-size: 125%;">{{{above}}}</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td colspan="2" style="text-align: center">{{{subheader}}}</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td colspan="2" style="text-align: center">{{{image}}} | ||
| + | <div style="text-align: center">{{{caption}}}</div> | ||
| + | </td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th colspan="2" style="text-align: center; background-color:#ededed;">{{{header1}}}</th> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope="row" style="text-align: left; vertical-align: top">{{{header1}}}</th> | ||
| + | <td scope="row" style="text-align: left; vertical-align: top">{{{data1}}}</td> | ||
| + | </tr> | ||
</table><noinclude> | </table><noinclude> | ||
<!--Categories go near the bottom of the /doc page.--> | <!--Categories go near the bottom of the /doc page.--> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 18:15, 7 December 2023
| {{{above}}} | |
|---|---|
| {{{subheader}}} | |
| {{{image}}}
{{{caption}}}
|
|
| {{{header1}}} | |
| {{{header1}}} | {{{data1}}} |
Template documentation
Generic infobox template. Core infobox template for other, specialized templates, for example {{Infobox car}} and {{Infobox league}}.
Usage
Basic
| Markup | Renders as | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox
| above = Text above
| subheader = Subheader of the infobox
| header1 = Header 1 text
| label1 = Label 1
| data1 = Data 1
| header2 = Header 2 text
| label2 = Label 2
| data2 = Data 2
| header3 = Header 3 text
| data3 = Data 3
}}
|
| ||||||||||
All parameters
| Text above | |
|---|---|
| Subheader of the infobox | |
Caption below image 1
|
|
| Header 1 text | |
| Header 1 text | Data 1 |
Without any parameters
| Markup | Renders as | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox}}
|
| ||||||||||
Custom styles
| Markup | Renders as | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox
| titlestyle = background: #ddd;
| abovestyle = background: #cfc;
| subheaderstyle = background: #ffc;
| title = Text in caption over infobox
| above = Text above
| subheader = Subheader of the infobox
| headerstyle = background: #ccf;
| labelstyle = background: #ddf;
| datastyle = background: #dedede;
| header1 = Header 1 text
| label1 = Label 1
| data1 = Data 1
| header2style = background: #cff;
| header2 = Header 2 text
| data2 = Data 2
}}
|
| ||||||||||
Only data rows
| Markup | Renders as | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
{{Infobox
| above = Text above
| subheader = Subheader of the infobox
| label1 = Label 1
| data1 = Data 1
| label2 = Label 2
| data2 = Data 2
| label3 = Label 3
| data3 = Data 3
| data4 = Data 4
| data5 = Data 5
}}
|
| ||||||||||