Difference between revisions of "Template:Pre"

From LDraw.org Wiki
Jump to navigation Jump to search
(Created page with "<p style="width:auto; border:1px solid #DDDDDD; border-radius:2px; background-color:#F9F9F9; font-family:monospace; padding:1em; line-height:1.15; margin-bottom:1em; white-spa...")
 
m (Minor code fix)
 
Line 1: Line 1:
<p style="width:auto; border:1px solid #DDDDDD; border-radius:2px; background-color:#F9F9F9; font-family:monospace; padding:1em; line-height:1.15; margin-bottom:1em; white-space:pre-wrap; word-wrap:break-word">{{{1}}}</p><noinclude>
+
<p style="width:auto; border:1px solid #DDDDDD; border-radius:2px; background-color:#F9F9F9; font-family:monospace; padding:1em; line-height:1.15; margin-bottom:1em; overflow:auto; white-space:pre-wrap; word-wrap:break-word">{{{1}}}</p><noinclude>
 
==Usage==
 
==Usage==
 
<pre>{{pre|text}}</pre>
 
<pre>{{pre|text}}</pre>

Latest revision as of 08:57, 24 January 2015

{{{1}}}

Usage

{{pre|text}}

This is an updated version of the <pre> tag, which dynamically alters text based on the width of the element.

Text is displayed as would be expected with the <pre> tag, but any lines that are too long to display are simply wrapped to the next line, rather than overflowing or disappearing.