http://www.westciv.com/style_master/academy/browser_support/element_type.html
I'll go back to using <code> for code blocks then. :)
Thanks for pointing out the property, Martin.
Ben
On 5/31/05, Martin J. Lambert <[EMAIL PROTECTED]> wrote:
> From: Ben
>
> After some testing, I think it's best to stick to using <pre> for
> blocks of code. <code> won't preserve whitespace, so your code's
> not going to have any indenting unless you use a lot of non-breaking
> spaces which will inflate the size of your file and not to mention
> a real be a pain in the butt to add.
How about using the <code> element (since it IS code), and using
the following styles:
code {
display: block;
white-space: pre;
}
In my very quick test just now it seems to work in Firefox and IE,
so I'd assume it works pretty much anywhere. This gets you the best
of both worlds - the semantics of <code> and the presentation of
<pre>.
--
Martin Lambert
[EMAIL PROTECTED]
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************