Template:Mbox: Difference between revisions
Appearance
Devaccount01 (talk | contribs) Created page with "<table class="msgbox {{#if: {{{classes|}}}|{{{classes}}}|}}" style="{{#if: {{{border|}}}|border-color: {{{border}}};|}} {{#if: {{{background|}}}|background: {{{background}}};|}} {{#if: {{{color|}}}|color: {{{color}}};|}}"> <tr> <td class="msgboximg" style="min-width:{{{min-width|50}}}px;"> {{#if: {{{image|}}}| [[File:{{{image}}}|{{{iwidth|50}}}px|{{{pic-align|center}}}|{{{caption|}}}]] }} </td> <td>{{{text|}}}</td> </tr> </table> {{Mbox | text = This is some awesome tex..." |
Devaccount01 (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<table class="msgbox {{#if: {{{classes|}}}|{{{classes}}}|}}" style="{{#if: {{{border|}}}|border | <table class="msgbox {{#if: {{{classes|}}}|{{{classes}}}|}}" style="display:inline-table; vertical-align:top; margin:0 2px 4px 0; border-collapse:collapse; {{#if: {{{border|}}}|border:1px solid {{{border}}};|}} {{#if: {{{background|}}}|background:{{{background}}};|}} {{#if: {{{color|}}}|color:{{{color}}};|}}"> | ||
<tr> | <tr> | ||
{{#if: {{{image|}}}| | {{#if: {{{image|}}}| | ||
<td class="msgboximg" style="min-width:{{{min-width|50}}}px; padding:4px;"> | |||
[[File:{{{image}}}|{{{iwidth|50}}}px|{{{pic-align|center}}}|{{{caption|}}}]] | [[File:{{{image}}}|{{{iwidth|50}}}px|{{{pic-align|center}}}|{{{caption|}}}]] | ||
</td> | |||
}} | }} | ||
<td style="padding:4px;">{{{text|}}}</td> | |||
<td>{{{text|}}}</td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
<noinclude> | |||
{{Mbox | {{Mbox | ||
| text = This is some awesome text! | | text = This is some awesome text! | ||
| iwidth = 50 | | iwidth = 50 | ||
| border = #ddd | | border = #ddd | ||
| background = # | | background = #000 | ||
| color = # | | color = #fff | ||
| min-width = 50 | | min-width = 50 | ||
| pic-align = center | | pic-align = center | ||
}} | }} | ||
== Usage == | == Usage == | ||
| Line 34: | Line 30: | ||
| caption = Image caption | | caption = Image caption | ||
| border = #ddd | | border = #ddd | ||
| background = # | | background = #000 | ||
| color = # | | color = #fff | ||
| min-width = 50 | | min-width = 50 | ||
| pic-align = center | | pic-align = center | ||
| Line 53: | Line 49: | ||
* '''min-width''' — Minimum width of the image cell. Defaults to 50px. | * '''min-width''' — Minimum width of the image cell. Defaults to 50px. | ||
* '''pic-align''' — Image alignment. Defaults to center. | * '''pic-align''' — Image alignment. Defaults to center. | ||
* '''classes''' — Optional CSS classes. | * '''classes''' — Optional CSS classes.i wa | ||
[[Category:Layout templates]] | [[Category:Layout templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 17:54, 4 September 2026
| This is some awesome text! |
Usage
Creates a message box that can be used by other templates.
{{Mbox
| text = Text inside the box
| image = Example.png
| iwidth = 50
| caption = Image caption
| border = #ddd
| background = #000
| color = #fff
| min-width = 50
| pic-align = center
| classes = custom-class
}}
Parameters
- text — Text displayed inside the box.
- image — Optional image. Use the file name only.
- iwidth — Image width. Defaults to 50px.
- caption — Optional image caption.
- border — Border color.
- background — Background color.
- color — Text color.
- min-width — Minimum width of the image cell. Defaults to 50px.
- pic-align — Image alignment. Defaults to center.
- classes — Optional CSS classes.i wa