Template:Message box: Difference between revisions
Mastergalen (talk | contribs) (Fix class) |
FantasyTeddy (talk | contribs) No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly><div class="alert {{{class|}}}" style="background-color: {{{bgcol|#D9EDF7}}}; border-color: {{{linecol|#BCE8F1}}}; color: {{{textcol|#3A87AD}}}; {{{css|}}}">{{#if: {{{icon|}}} | <div class="icon-{{{icon|}}} icon-2x" style="vertical-align: middle; padding-right: 10px;"></div>}}<div style="vertical-align: middle; display: inline-block;">{{#if: {{{title|}}} | '''{{{title}}}'''<br />}}{{{text}}}</div></div>{{#if: {{{nocat|}}} || {{#ifeq: {{NAMESPACE}} | Template | [[Category:Notice templates|{{BASEPAGENAME}}]] }} }}</includeonly><noinclude> | ||
<div class="alert {{ # | |||
{{documentation}}</noinclude> | {{documentation}}</noinclude> |
Latest revision as of 16:14, 1 August 2015
- Shortcut
- msgbox
This template is used to add consistent styling to message boxes.
Basic usage
{{msgbox | title = This is a normal message box | text = With helpful and descriptive subtext }}
Will result in:
This is a normal message box
With helpful and descriptive subtext
With helpful and descriptive subtext
An icon can be added to indicate the type of the message:
{{msgbox | icon = info-sign | text = This is a message box with an information icon }}
Will result in:
This is a message box with an information icon
The Font Awesome Icons are used here (without the icon-
prefix).
Advanced usage
{{msgbox | bgcol = #eef | linecol = #ddf | textcol = #336 | icon = flag | title = This is a purple message box | text = It is customized with some extra CSS | css = box-shadow: 0px 0px 6px #888; }}
Will result in:
This is a purple message box
It is customized with some extra CSS
It is customized with some extra CSS
Category
This template automatically adds templates that use it to Category:Notice templates. To prevent that, simply set the parameter {{{nocat}}}
[view | edit | history | purge]The above documentation is transcluded from Template:Message box/doc.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.