This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > February 2004 > style sheets, preformatted text, and word-wrappin/scrolling
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
style sheets, preformatted text, and word-wrappin/scrolling
|
|
| Colin Thomas 2004-02-23, 12:29 am |
| Hey,
I am having an issue where I need to display preformatted text
(already has the <pre> tag) within a area that I designate with
stylesheets. How can I get the area specified in a css class to stay
the same width and scroll to show the preformatted text. Right now,
the pre tag is causing the area to widen.
Thanks,
Colin
| |
| Jukka K. Korpela 2004-02-23, 3:28 am |
| coliniam@hotmail.com (Colin Thomas) wrote:
> I am having an issue where I need to display preformatted text
> (already has the <pre> tag) within a area that I designate with
> stylesheets.
It is usually best to start from reconsidering the need to display
preformatted text. For this purpose, it is instructive to think how
<pre> maps to a combination of font-family and white-space, and the
latter is actually a conglomerate of logically different properties.
So which features do you really need?
> How can I get the area specified in a css class to stay
> the same width and scroll to show the preformatted text. Right now,
> the pre tag is causing the area to widen.
Advanced browsers seem to do what you want if you use
pre { display: table; }
and on IE the problem does not appear, since it incorrecty expands the
width of the block, instead of letting the content overflow. I'm not
sure of what your last sentence means.
If you mean that you would like the content to be _separately_
scrollable, then using <iframe> to embed a plain text file might be the
most practical solution. But you could also use
pre { overflow: scroll; }
--
Yucca, http://www.cs.tut.fi/~jkorpela/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|