Template:Pre: Difference between revisions
Template page
More actions
update |
adding | to style parameter (caused invalid CSS warning) + Deprecated |
||
| Line 1: | Line 1: | ||
<pre<includeonly></includeonly> style="overflow: auto;{{{style}}}">{{{1}}}</pre><noinclude> | <pre<includeonly></includeonly> style="overflow: auto;{{{style|}}}">{{{1}}}</pre><noinclude> | ||
{{Deprecated|note= Use <nowiki><pre>{{{1}}}</pre></nowiki> instead. MediaWiki now breaks words in core.}} | |||
---- | ---- | ||
Same as using | Same as using <nowiki><pre></nowiki>-tags but the text won't run off screen and instead will appear with a scrollbar. | ||
The optional parameter of ''style'' may be added for other css format options. For example <nowiki>{{pre |style=color:darkblue |My text here.}}</nowiki> | The optional parameter of ''style'' may be added for other css format options. For example <nowiki>{{pre|style= color:darkblue| My text here.}}</nowiki> | ||
'''Code:''' | '''Code:''' | ||
| Line 11: | Line 12: | ||
</nowiki>}} | </nowiki>}} | ||
'''Example:'''< | '''Example:''' | ||
<pre> | |||
000000000000000000 lines don't wrap | {{pre| | ||
000000000000000000 lines don't wrap 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | |||
}} | |||
</pre> | |||
Gives: | Gives: | ||
Revision as of 00:38, 17 January 2011
{{{1}}}
Same as using <pre>-tags but the text won't run off screen and instead will appear with a scrollbar.
The optional parameter of style may be added for other css format options. For example {{pre|style= color:darkblue| My text here.}}
Code:
<pre style="overflow: auto;">{{{1}}}</pre>
Example:
{{pre|
000000000000000000 lines don't wrap 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
}}
Gives:
000000000000000000 lines don't wrap 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000