Материал из RuedaPedia
Перейти к навигации Перейти к поиску



These templates alternate HTML and unicode acceptable variations of ways to declaring spaces, forcing browsers to recognize each in turn, when their rendering would normally compact and eliminate successive spaces. In short, they force padding within, before, or after a field which includes them in a line (which in practice, is usually within a wikitable, to force alignments of long and short words, such as month names, etc.)


Note this is common usage for {{Space}}

This {{Space}} template can be used inline to create alignment between adjacent text lines, or to space out titles, etc. Like {{indent}}, it takes a numeric argument 'nn' after the pipe and provides that many consecutive spaces. Indent differs only in that it automatically begins a newline, then spaces over nn spaces.


{{indent|2}}, {{space|7}}, etc.

The templates space and indent are limited to adding 30 spaces, and have a cost in pre-expansion template size, because their logic contains 30 sets of the counted spaces.
  • Better results, for indenting large sections, can frequently be gained by using {{nowrap}} and/or the HTML formatting <tt> ...</tt> about any of the spacing templates, since browser design philosophy is to trim consecutive spaces, check results also in different zoom settings, and on more than one browser if possible. One repeat offender is the IE browser family... which is unfortunately the numerically predominate browser of the world, by a large margin, since it's embedded within most turn-key personal computer sales.

See also

{{s}} or 'SP'brief 'switch logic' version for inline use, defaults to 3 spaces given no numeric argument, will expand up to 8 spaces. {{s}} is a subset of {{space}}. Recommend replacing BOTH (if used 100 times), on grounds of costs to pre-expansion template limits, with inline expansions of {{space}} or using the numbered-versions (below), particularly in oft-used templates. Since January 2008, Wikipedia's new MediaWiki parser avoids pre-expansion and only retains the space-strings generated by those templates.