Template:Pre2/doc

From Zoophilia Wiki
Revision as of 20:42, 13 June 2008 by meta>Unused0029 (change ambox content - this a work in progress)
Jump to navigationJump to search


This template simply uses <pre> tags, but with wrapped text. This means the text will not stretch past the right side of the screen.

Usage

{{Pre2|Text to be displayed. And more and more and more...}}

produces:
Text to be displayed. And more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more.

Coding

The template contains:

<pre style="
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
white-space: pre-wrap;
word-wrap: break-word;
">{{{1}}}</pre>

This tells all of the popular browsers to wrap the text. The width= attribute is now deprecated, so <pre width=100%> will not work in all browsers i.e. Internet Explorer.

See also