Template:BoxWidthIndent

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (add instruction)
m (add instruction)
 
Line 7: Line 7:
 
<div style="width:24em;margin:0 0 0 2em;padding:0;border:none;">
 
<div style="width:24em;margin:0 0 0 2em;padding:0;border:none;">
 
  &lt;div <nowiki>{{</nowiki>BoxWidthIndent|'''''W'''''|'''''I'''''}} &gt;
 
  &lt;div <nowiki>{{</nowiki>BoxWidthIndent|'''''W'''''|'''''I'''''}} &gt;
...your code sample goes here...
+
  your code sample goes here...
 
  &lt;/div&gt;
 
  &lt;/div&gt;
 
</div>
 
</div>
:where '''<tt>''W''</tt>''' = width and '''<tt>''I''</tt>''' = indentation, in character-width (CSS ''em'') units.
+
: ...where '''<tt>''W''</tt>''' = width and '''<tt>''I''</tt>''' = indentation, in character-width (CSS ''em'') units.
:(decimal values like 1.25 are allowed, but trailing spaces eg, <code>|1 |1.2 }}</code> will create invalid CSS)
+
::(decimal values like 1.25 are allowed, but trailing spaces eg, <code>|1 |1.2 }}</code> will create invalid CSS)
 
+
:*The contents of the <tt>&lt;div&gt;</tt> can be anything you like; however this template was created for preformatted text as shown above.
*The preview above can be created with &nbsp; <code>&lt;div <nowiki>{{</nowiki>BoxWidthIndent|24|2}}&gt;</code> &nbsp;
+
:*Your [http://www.mediawiki.org/wiki/Help:Formatting preformatted] text starts each line with one or more spaces, as usual.
 +
:*The preview above can be created with &nbsp; <code>&lt;div <nowiki>{{</nowiki>BoxWidthIndent|24|2}}&gt;</code> &nbsp;
 
--[[User:Raffriff42|Raffriff42]] 01:10, 4 January 2016 (CET)
 
--[[User:Raffriff42|Raffriff42]] 01:10, 4 January 2016 (CET)
 
[[Category:Format_templates]]
 
[[Category:Format_templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 02:52, 4 January 2016

style="width:80em;margin:0 0 0 0em;padding:0;border:none;"


purpose;
create a smaller, neater, optionally indented, code (PRE) block; may also be useful for other box elements

usage and preview:

<div {{BoxWidthIndent|W|I}} >
 your code sample goes here...
</div>
...where W = width and I = indentation, in character-width (CSS em) units.
(decimal values like 1.25 are allowed, but trailing spaces eg, |1 |1.2 }} will create invalid CSS)
  • The contents of the <div> can be anything you like; however this template was created for preformatted text as shown above.
  • Your preformatted text starts each line with one or more spaces, as usual.
  • The preview above can be created with   <div {{BoxWidthIndent|24|2}}>  

--Raffriff42 01:10, 4 January 2016 (CET)

Personal tools