I don't know why you would want your text to go off the screen. You
should use something like:
pre {
overflow:auto;
}
This will add a scroll bar if your text overflows, and it also allows
for your text to be formatted the way you want.
If you still would like the data to overflow off the screen, a DIV
with display:inline, pre:no-wrap, and courier font is probably your
best option. You'll have to do some hacks to get this to display
properly in IE6.
Hope this answers your question.
On Jul 7, 5:53 pm, Harris <[email protected]> wrote:
> Hi, I have a long line of text that goes off the screen, and I'm
> trying to put a red border around the whole line, but the code below
> just puts the border around the part that's onscreen. How do I get the
> border to surround the whole line?
>
> <pre style="border:5px solid red">Lorem ipsum dolor sit amet,
> consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
> exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
> dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
> proident, sunt in culpa qui officia deserunt mollit anim id est
> laborum.</pre>
--
--
You received this because you are subscribed to the "Design the Web with CSS"
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]