Difference between revisions of "Template:Info"

From PINE64
Jump to navigation Jump to search
(+templ)
 
(changed padding)
Line 33: Line 33:
min-height: 1.6em;
min-height: 1.6em;
margin: .5em 0;
margin: .5em 0;
padding: .5em 1em;
padding: 0.1em 0.3em;
border: 1px solid #e3e3e3;
border: 1px solid #e3e3e3;
color: #000000;
color: #000000;
background-color: #f4f4f4;
background-color: #f4f4f4;
">{{{1|}}}</div></includeonly>
">{{{1|}}}</div></includeonly>

Revision as of 19:21, 6 February 2022

This page is a template. Check out all pages using this template.
For more information, read Template:Template.

A general, non-obtrusive information box.

Usage

{{Info|information content}}

Example

{{Info|This is an information.}}
This is an information.

Technical notes

The boxes use display: table to support both adaptive width and floating siblings, all other alternatives can't archive them as perfect as this solution within just one HTML element. However, it has its own flaw, if you put it into another table, its padding will gone. Avoid putting hints, notes and warnings into any tables until solution was found, or we give up and use two elements for just one box.

This template uses class .template-box and .template-warning. In the future, if the TemplateStyles Extension is installed on this MediaWiki instance, one may move the embedded inline styles to Template Style files.

See also