Jump to content

Template:Inline-center/doc

From Wikisource

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]


No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Text to center

Contentoptional
ww

Width of text block to use.

Unknownoptional
stylestyle

Additional CSS to apply

Contentoptional