web issue: PRE tag problem?

Mike Culbertson mike at omnipod.com
Tue Jun 17 20:34:02 BST 2003


I am having a problem with properly displaying PRE tags with Konqueror.
 I have several blocks of preformatted text that consist of a few long lines 
with no line breaks, as well as a few shorter lines with breaks before and 
after.
 
 According to the W3C specification for HTML 4.01 Transitional and XHTML 1.0 
Transitional, PRE tags have one optional attribute, "width". The width of an 
element can also be set within embedded styles or with external sheets, or 
you can constrain the width by regulating table size.
 
 However, when I try to display a long line of preformatted text with the 
width set inside the PRE tag, or with a STYLE attribute in the PRE tag, /or/ 
by setting the width of the table, all width values are completely ignored 
and the text is displayed as one very long line. An example can be see here:
 
 http://mc.infoleak.com/pretag.html
 
 The page validates as both HTML 4.01 Transitional and XHTML 1.0 Transitional, 
and if the width attributes are removed from the PRE tags, it should validat 
as strict.
 
 This is most likely not exclusively a problem with Konqueror,  but I am 
stumped. Is it a lack of forward compatibility, backwards compatibility or a 
code problem? More importantly, how can preformatted text be forced to fit 
inside a certain area?
 
 Thanks very much in advance.
 
 Mike Culbertson 





More information about the kfm-devel mailing list