David C. Rankin schreef:
Listmates,
Working with a page, I wanted to put a dashed border around some text to show that it was a command line. If I don't put a manual break in, I either get a scroll bar with 'overflow: auto' or the text just runs off the page.
I want the text to look like this (I put a manual break in):
http://www.3111skyline.com/download/screenshots/webdev/codeblock-manual-brea...
(snip)
I'm using the pre tag like this:
<pre>hddtemp $(for i in $(cat /proc/partitions | egrep sd[abcdefgh]$ | sed -e 's/^.*s/s/'); do echo -n "/dev/$i "; done)</pre>
So far I can only get it to work if I put a <br> in front of sed. What am I doing wrong? I see these code blocks all the time, and I know everybody isn't going to the trouble of putting in manual breaks. What's the trick?
Quoting from the Quanta html manual: "The PRE element contains preformatted text. Visual browsers should render preformatted text in a fixed-pitch font, should not collapse whitespace, and should not wrap long lines." And what you want it to do is wrap long lines. So I guess you should not use <pre>, but a generic <div>. If you have several div's with different styles use id's within the <div> to identify them in the style sheet. <shameless plug> I find the on line documentation of Quanta indispensible. HTML, JavaScript, PHP, css is all on board. It is my favorite web developer tool. Regards, -- Jos van Kan registered Linux user #152704 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org