|
Hello Jon,
You wrote:
>The code below shows basically what I'm trying to do. It is a simple table
>to contain pre-formed print lines. The tags that are causing the problem
>are the <PRE> ones. They work just fine in terms of maintaining the
>spacing within a line, but they cause the row height to be doubled for no
>reason I can see. It seems to me that I should be able to use <CODE>
>instead. True enough this resolves the height issue, but also causes the
>line spacing to get scewed up because multiple spaces are compressed. This
>seems very strange behaviour for a tag designed to allow you to show code
>samples but .....
The "problem" is that the </pre> tag inserts a hard carriage return. The
row height is not really doubled, it just appears that way because you are
providing a single line of text. </Pre> adds a carriage return thus causing
two lines to appear in the row. You can prove this by formatting multiple
lines within one <pre> block. For example:
<TR bgcolor="#C6EFF7"><TD><pre>12345678901234567890
another line
yet another line
more lines
</pre></TD></TR>
will format correctly as single spaced lines followed by an empty line. You
can also see this effect by inserting an extraneous </pre> tag in the middle
of a paragraph. For example:
<P>Here is some formatted text followed by an extra tag:
</pre>
And here is the continuation with no paragraph tag.
will format with a blank line where the </pre> tag occurs due to the hard
carriage return. Remove the </pre> and the lines format as single spaced
again.
I think you'll just have to live with it. The formatting may also vary
depending on which browser you suffer.
The reason <code> doesn't seem to do what you want is because it is a
logical formatting tag rather than a physical formatting tag. That
distinction is probably the biggest failing in HTML. HTML is a bit confused
as to whether it is a markup language or a formatting language. They should
never have designed physical tags but simply made everything logical but
that leads into another argument entirely ....
Regards,
Simon Coulter.
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software AS/400 Technical Specialists «»
«» Eclipse the competition - run your business on an IBM AS/400. «»
«» «»
«» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 «»
«» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au «»
«» «»
«» Windoze should not be open at Warp speed. «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
+---
| This is the WEB400 Mailing List!
| To submit a new message, send your mail to WEB400@midrange.com.
| To subscribe to this list send email to WEB400-SUB@midrange.com.
| To unsubscribe from this list send email to WEB400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.