Sent by Trevor Nicholls on 15 April 2008 08:08
Hello
Scattered liberally throughout my webpages one will find pieces of
application code which have been marked up as <span class="preformatted">.
The preformatted class is used for code which may occupy a single word, or
may extend over several lines. For this reason carriage returns and
whitespace in these spans need to be honoured, so the CSS which is in force
defines
.preformatted { white-space: pre; }
When these spans occur inside longer paragraphs we find that sometimes the
paragraph is not linewrapped at all (although "pre" applies only to the
short phrase and not to the entire paragraph).
For an example, have a look at http://homepages.ihug.co.nz/~tmjpbn/pref.html
and http://homepages.ihug.co.nz/~tmjpbn/pref1.html
The first paragraph and following note use the preformatted span, while the
subsequent paragraph and note do not. You will notice that the first note
line is displayed on one line without line wrap. For some reason the first
paragraph is not similarly afflicted, although in the larger document from
which this sample was extracted this particular paragraph is also laid out
incorrectly: the first few lines wrap but after reaching the first
"preformatted" span the rest of the paragraph fails to wrap at all. In my
real documents some paragraphs do this and some are formatted OK; I can't
see any difference - but it's always the same paragraphs that misbehave.
The "pref1" page has "white-space: pre" commented out, and the problem goes
away.
Naturally Firefox behaves impeccably, but (as before) I am restricted to
using IE7. Is anyone able to explain what is going on, and how I could get
IE7 to linewrap these paragraphs correctly, please?
Cheers
T
Trevor Nicholls
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/