Template:Doc-page-head

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(genesis)
 
(update and correct)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
<div style="background:#effafa; width={{{width|100%}}}; padding:1.5em;" > <!--
+
<div style="background:{{{BG|#effafa}}}; width={{{width|100%}}}; padding:{{{PAD|1.5em}}}; margin:{{{MARG|0}}}; align:{{{align|left}}}; float:{{{float|auto}}}; border:{{{border|0}}};" > <!--
 
--><noinclude>
 
--><noinclude>
 
;Usage
 
;Usage
 
Use this template immediately above the first text that you want to show on usage pages, particularly templates
 
Use this template immediately above the first text that you want to show on usage pages, particularly templates
  
'''<u>Purpose:</u>''' to act as a <code>&nbsp;<nowiki>&lt;span style= {{...}}</nowiki>&nbsp;</code> header-block starter to set up a standard appearance on template documentation pages with minor HTML formatting.  
+
'''<u>Purpose:</u>''' to act as a <code>&nbsp;<nowiki>&lt;div style= </nowiki>{{...}}&nbsp;</code> header-block starter to set up a standard appearance on template documentation pages with minor HTML formatting.  
  
* The formatting so inserted should be 'closed' by installing a <code>&nbsp;<nowiki></span></nowiki>&nbsp; tag</code>  
+
* The formatting so inserted should be 'closed' by installing a <code>&nbsp;&lt;/div>&nbsp; tag</code>  
: or by inserting the {{Doc-page-end}} template which does that.
+
: or by inserting the <nowiki>{{Doc-page-end}}</nowiki> </code>template which does that.
 +
;Alternative usages
 +
The template has named parameters which if defined change the appearance and effect: <code>&nbsp;border=, BG=, width=, PAD=, MARG=, float=; and align=&nbsp; </code> which respectively affect and override defaulted style <code>'border', 'background', 'width', 'padding', 'margin', 'float:', and text 'align:' HMTL parameters.
 +
* margin and padding are given in order top, right, bottom, left, so 'margin: 0 2em 0 2em' produces a left and right margin of two 'm' character widths. Alternatively, 'padding: 3px 5px 3px 5px' will squeeze the inclosed text inside the default box 3 and 5 pixels from top RHS bot LHS.
 +
* PAD/padding needs three parameters, linestyle, color and width in pixels usually ordered and expressed in the opposite order:
 +
:* <code> border: 3px solid blue </code> or <code>border=5px groove</code><br/> which express respectively as a <code>blue 3 pixel border</code> and a <code>red 5 pixel grooved border</code> (this latter example, giving something of a 3D look).
  
 +
:See {{Wp|HTML|HTML @ Wikipedia}} for further allowed coding options.
 +
: Alternative: {{Tl|Usage-style}}
 
[[Category:Typing-aid templates|{{PAGENAME}}]]
 
[[Category:Typing-aid templates|{{PAGENAME}}]]
 
[[Category:Formatting templates|{{PAGENAME}}]]
 
[[Category:Formatting templates|{{PAGENAME}}]]
 
[[Category:Self-documenting templates|{{PAGENAME}}]]
 
[[Category:Self-documenting templates|{{PAGENAME}}]]
 
</div></noinclude>
 
</div></noinclude>

Latest revision as of 00:18, 6 July 2013

Usage

Use this template immediately above the first text that you want to show on usage pages, particularly templates

Purpose: to act as a  <div style= …  header-block starter to set up a standard appearance on template documentation pages with minor HTML formatting.

  • The formatting so inserted should be 'closed' by installing a  </div>  tag
or by inserting the {{Doc-page-end}} </code>template which does that.
Alternative usages

The template has named parameters which if defined change the appearance and effect:  border=, BG=, width=, PAD=, MARG=, float=; and align=  which respectively affect and override defaulted style 'border', 'background', 'width', 'padding', 'margin', 'float:', and text 'align:' HMTL parameters.

  • margin and padding are given in order top, right, bottom, left, so 'margin: 0 2em 0 2em' produces a left and right margin of two 'm' character widths. Alternatively, 'padding: 3px 5px 3px 5px' will squeeze the inclosed text inside the default box 3 and 5 pixels from top RHS bot LHS.
  • PAD/padding needs three parameters, linestyle, color and width in pixels usually ordered and expressed in the opposite order:
  • <code> border: 3px solid blue or border=5px groove
    which express respectively as a blue 3 pixel border and a red 5 pixel grooved border (this latter example, giving something of a 3D look).
See HTML @ Wikipedia for further allowed coding options.
Alternative: {{Usage-style}}
Personal tools