Template:Inline-center/doc
This is a documentation subpage for Template:Inline-center. It contains usage information, categories and other content that is not part of the original template page. |
Usage
[edit]This template centers a span using 'display:block' CSS styling, working around Mediawiki or HTMLtidy's practice of breaking paragraphs when encountering a div. This allows the centered text to be semantically inline but visually centered, useful for quotes, equations, etc. Paragraph indentation should not mistakenly indent the continued paragraph as a new paragraph would. Using {{center}} in these situations will cause a paragraph break.
Examples
[edit]Equations
[edit][[File:Eddington A. Space Time and Gravitation. Fig. 2.jpg|150px|left]] [text...] {{inline-center|<math>s^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2</math>.}} [...text]
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat: . Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
See also
[edit]- {{Inline-block}}
- {{Inline-right}}
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | Text to center | Content | optional |
w | w | Width of text block to use. | Unknown | optional |
style | style | Additional CSS to apply | Content | optional |