[pmwiki-users] Single Space breaks wrap on entire page

Waylan Limberg waylan at gmail.com
Wed Sep 21 11:43:29 CDT 2005


> > >
> > >I wonder if there's something that we could do with <div> and
> > >CSS positioning here... i.e., if we enclosed <pre> somehow
> > >in a <div> that eliminates the width problem...?
> > >
> > >
>
> Well, the whitespace property
> (http://www.w3.org/TR/REC-CSS2/text.html#white-space-prop) is the one
> that controls such things, but there is no way to 'turn on' wraping
> without disabiling the other features of pre. Setting
> 'whitespace:normal' would work for Sivakatirswami; basicaly causing
> the browser to treat the <pre> as a <p>. However, when you want
> <pre>'s to acts as <pre>'s, then you get nowrap. Which means you have
> to have php add in the line breaks for you.
>
For completness, I was going to say that you could set
whitespace:normal and then add rules to recreate the pre styling, but
the thing about pre is that it does not collapse whitespace., Sure,
you can set 'font-family:monospace', but to my knowledge, whitespace
is still collapsed. The only what to not collapse whitespace is with
pre and nowrap alone cannot be dissabled in pre. An oversight IMHO by
the CSS developers.


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list