Template:Doc-page-head

From TrainzOnline
Revision as of 09:07, 17 June 2013 by Fabartus (talk | contribs) (generalize, install named params to alter presentation)
Jump to navigationJump to search
Usage

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

Purpose: to act as a  <span 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  </span>  tag
or by inserting the {{Doc-page-end}} 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:
  • 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.