From:  johan m <>
Date:  14 Aug 2008 20:52:19 Hong Kong Time

Re: Spaces in Option objects


The option element content is of type #PCDATA. Unfortunately I don't 
know exactly how the specification defines #PCDATA, so if you want 
precise info I suppose you'd have to get a copy. But I believe it's 
defined in the SGML spec.

So, wether the ws-collapsing is according to standard or not is beyond 
my knowledge, but what I do know is:

- #PCDATA allows character entity references, such as " " which 
means that you could insert those instead of " " directly, and they are 
then converted and displays as you wanted.
- the CSS property white-space with a value of "pre" will preserve all 
whitespaces, both " " and line breaks, while "pre-wrap" will do the same 
but add automatic wrapping (while "pre-line" preserves only linebreaks). 
pre-wrap and pre-line were added in CSS2.1

As such, using either the   approach or using "pre" or "pre-wrap" 
SHOULD work.
- However only the   approach actually does so to any extent. It 
works on FF2 and FF3.0.1 on OSX as well as FF3.2 on XP (as well as 
safari and even IE6).
- style="white-space: pre" works on FF2 (osx), FF3 (xp, but NOT on osx)
- style="white-space: pre-wrap" not only doesn't work (anywhere), it is 
also a non-reqognized value in FF2 and FF3 (XP)

Conclusion: stick with the   approach.


Christian Tiberg skrev:
> Hi there!
> I'm trying to make an indented list in a