Jump to content

Template:PTstyle

From Wikibooks, open books for an open world

"padding: 1em; border: 1px dashed rgb(47, 111, 171);color: black; background:rgb(249, 249, 249); max-width:66%; width:66%; align:left; font-face:monospace; font-size:10pt; ;"

Purpose

Creates a standardized HTML quote bounded style string with options that can be overridden locally. It is in effect, a poor-man's CSS class element, but one which one does not need ADMIN privileges to edit.

The format created by this style replicates a wikimarkup line with a leading whitespace character,
like these two lines.
  • It's usual and intended use is in long-tables, mainly those showing examples of Trainz data structures, or sample config.txt files.
  • This template provides compatible formatting to duplicate the appearance of the monospace tables the N3V staff used when building pages for Kinds, containers and so forth.
  • Using this template to set the style allows a wikitable to neaten up the staffs ragged efforts, and make things more readable with uniform sized columns, alternative fonts, embedding links, and so forth.
usage
  • This template is meant to be used in an HTML style tag after the < '...' > so as to form HTML format commands like:

{| style= {{Pseudo-table}} and forms the pre-quoted string above. The raw code has over-ride parameters B,BG,CO,MW,W,P,M

Over ride parameters shown below
 "padding: {{{P|1em}}}; border: {{{B|1px dashed rgb(47, 111, 171)}}};
 color: {{{CO|black}}};
 background:{{{BG|rgb(249, 249, 249)}}};
 max-width:{{{MW|{{{maxwidth|68%}}}}}};
     width:{{{W|{{{width|68%}}}}}};
 align:{{{AL|left}}}; 
 font-face:{{{F|monospace}}};
 font-size:{{{S|10pt}}}; {{{other|}}};"
  • The default width is shown above, but the template call can be given an alternative width as follows:
form the call: {| style={{pseudo-table|width=XX%}} versus the default {| style={{pseudo-table}}
  • The format also provides for other format parameters to be included in the style block by defining the parameter 'other'.
    • for example: |other=color:blue; would assert the table contents as a blue font. Other HTML/CSS formatting elements are equally valid.

   

for other examples...
Use the What links here wiki feature to examin a use inclusion.