Hendrik Maryns wrote:
Quote:
Originally Posted by
Hi,
>
A friend complained that the border around the lower code part on
http://tcl.sfs.uni-tuebingen.de/~hendrik/keyboard.shtml is too small for
the content. This is because his window size is so small that the size
of the containing <preis smaller than the text in it. Since it is
<pre>, the text is not wrapped, but the border and background color get
smaller. Thus the text pops out of its box.
>
Is there something one can do against this?
|
No not really. You are giving conflicting rules. PRE in in monospace
font and preserves the whitespace and text newlines to the length of the
PRE text is fixed but the viewport may change...
3 options that I see, adjust the overflow property
pre.example {
padding: 3px 5px; border: 3px double silver;
background: #eee; overflow: auto;
/* causes a scrollbar if content does not fit */
}
pre.example {
padding: 3px 5px; border: 3px double silver;
background: #eee; overflow: hidden;
/* causes content to be clipped */
}
pre.example {
padding: 3px 5px; border: 3px double silver;
background: #eee; width: 20em;
/*
set width to static maximum line width
which is far from elegant and will probably
cause other problems...
*/
}
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com