Template:BoxWidthIndent: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs)
create a smaller, neater, optionally indented, code (PRE) block
 
Raffriff42 (talk | contribs)
m typo
Line 1: Line 1:
style="width:{{{1}}}em;margin:0 0 0 {{{2}}}em;padding:0;border:none;"<noinclude>
style="width:{{{1|80}}}em;margin:0 0 0 {{{2|0}}}em;padding:0;border:none;"<noinclude>
----
----
;purpose;
;purpose;
Line 6: Line 6:
'''usage and preview''':  
'''usage and preview''':  
<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;
Line 12: Line 12:
: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.


*The preview above can be created with &nbsp; <code>&lt;div <nowiki>{{{</nowiki>BoxWidthIndent|24|2}}&gt;</code> &nbsp;
*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>

Revision as of 02:14, 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.
  • The preview above can be created with   <div {{BoxWidthIndent|24|2}}>  

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