Log in

View Full Version : pre tag work around


saltedm8
05-21-2009, 12:28 AM
I am trying to get and [html] to validate by w3c I have tried loads of stuff. including this

[code]<!–[if !IE]><!–>
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[c0de]:</div>
<div class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
overflow: auto">
<code>$code
</code>
</div>
</div><!–<![endif]–>

<!--[if IE]>
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[c0de]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">$code</pre>
</div>
<![endif]-->


I just cant get it to work in both browsers, I have even done this

<!–[if !IE]><!–>
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[c0de]:</div>
<div class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
overflow: auto">
<code>$code
</code>
</div>
</div><!–<![endif]–>

<if condition="is_browser('ie')">
<!--[if IE]>
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase[c0de]:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">$code</pre>
</div>
<![endif]-->

</if>

but still no luck... has anyone got any ideas ?.. thanks

ps, I have had to replace code with c0de in the phrases because it was being read as a command in this post