Difference between revisions of "Template:Pad"

From Baka-Tsuki
Jump to navigation Jump to search
(Creation and test)
 
(Documentation)
Line 1: Line 1:
 
<span style="padding-left: {{{1|1em}}};">&nbsp;</span>
 
<span style="padding-left: {{{1|1em}}};">&nbsp;</span>
  +
  +
==Usage==
  +
  +
Use {{tl|pad}} to insert a horizontally padding HTML <nowiki><span></nowiki> inline. The template takes one unnamed parameter; a width value specified in <tt>px</tt>, <tt>em</tt> or <tt>ex</tt>. The default is <tt>1 em</tt>.
  +
  +
==Examples==
  +
  +
Indenting by 50 pixels (50px):
  +
* <code>Indenting 50px causes<nowiki><br />{{pad|50px}}</nowiki>this amount of space.</code>
  +
* Indenting 50px causes<br />{{pad|50px}}this amount of space.
  +
  +
Width of a year-range (4.8em):
  +
*<code>1492-1540 Exploration by<nowiki><br />{{pad|4.8em}}</nowiki>Columbus & others.</code>
  +
* 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  +
  +
For 1em and 6em:
  +
* <code>This is a <nowiki>{{pad|1em}}</nowiki> 1em padded sentence.</code>
  +
* <code>This is a <nowiki>{{pad|6em}}</nowiki> 6em padded example.</code>
  +
''Produces:''
  +
* This is a {{pad|1em}} 1em padded sentence.
  +
* This is a {{pad|6em}} 6em padded example.

Revision as of 00:14, 10 December 2012

 

Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, em or ex. The default is 1 em.

Examples

Indenting by 50 pixels (50px):

  • Indenting 50px causes<br />{{pad|50px}}this amount of space.
  • Indenting 50px causes
     

Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, em or ex. The default is 1 em.

Examples

Indenting by 50 pixels (50px):

  • Indenting 50px causes<br />{{pad|50px}}this amount of space.
  • Indenting 50px causes
    Template loop detected: Template:Padthis amount of space.

Width of a year-range (4.8em):

  • 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  • 1492-1540 Exploration by
    Template loop detected: Template:PadColumbus & others.

For 1em and 6em:

  • This is a {{pad|1em}} 1em padded sentence.
  • This is a {{pad|6em}} 6em padded example.

Produces:

  • This is a Template loop detected: Template:Pad 1em padded sentence.
  • This is a Template loop detected: Template:Pad 6em padded example.this amount of space.

Width of a year-range (4.8em):

  • 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  • 1492-1540 Exploration by
     

Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, em or ex. The default is 1 em.

Examples

Indenting by 50 pixels (50px):

  • Indenting 50px causes<br />{{pad|50px}}this amount of space.
  • Indenting 50px causes
    Template loop detected: Template:Padthis amount of space.

Width of a year-range (4.8em):

  • 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  • 1492-1540 Exploration by
    Template loop detected: Template:PadColumbus & others.

For 1em and 6em:

  • This is a {{pad|1em}} 1em padded sentence.
  • This is a {{pad|6em}} 6em padded example.

Produces:

  • This is a Template loop detected: Template:Pad 1em padded sentence.
  • This is a Template loop detected: Template:Pad 6em padded example.Columbus & others.

For 1em and 6em:

  • This is a {{pad|1em}} 1em padded sentence.
  • This is a {{pad|6em}} 6em padded example.

Produces:

  • This is a  

Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, em or ex. The default is 1 em.

Examples

Indenting by 50 pixels (50px):

  • Indenting 50px causes<br />{{pad|50px}}this amount of space.
  • Indenting 50px causes
    Template loop detected: Template:Padthis amount of space.

Width of a year-range (4.8em):

  • 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  • 1492-1540 Exploration by
    Template loop detected: Template:PadColumbus & others.

For 1em and 6em:

  • This is a {{pad|1em}} 1em padded sentence.
  • This is a {{pad|6em}} 6em padded example.

Produces:

  • This is a Template loop detected: Template:Pad 1em padded sentence.
  • This is a Template loop detected: Template:Pad 6em padded example. 1em padded sentence.
  • This is a  

Usage

Use {{pad}} to insert a horizontally padding HTML <span> inline. The template takes one unnamed parameter; a width value specified in px, em or ex. The default is 1 em.

Examples

Indenting by 50 pixels (50px):

  • Indenting 50px causes<br />{{pad|50px}}this amount of space.
  • Indenting 50px causes
    Template loop detected: Template:Padthis amount of space.

Width of a year-range (4.8em):

  • 1492-1540 Exploration by<br />{{pad|4.8em}}Columbus & others.
  • 1492-1540 Exploration by
    Template loop detected: Template:PadColumbus & others.

For 1em and 6em:

  • This is a {{pad|1em}} 1em padded sentence.
  • This is a {{pad|6em}} 6em padded example.

Produces:

  • This is a Template loop detected: Template:Pad 1em padded sentence.
  • This is a Template loop detected: Template:Pad 6em padded example. 6em padded example.