Hmm... I need to find out myself. I don't know what is the right answer. I'll do some Googling and get back to you if I discover an useful answer. You should email the people at iPage as they probably could answer your iPage question..
Apologies, I wasn't clear... it has never worked previously, I only started it this morning..
The data that is preformatted is in a database, so my code is:.
Response.write("<table width=500 border=0><tr><td><pre>"& blah &"</pre></td></td></table>").
Where blah is the string from the database..
Well accoring to that it will be at width of 500 and in a table. that all looks correct. but the 2 closing "td" do not. it won't stop IE from running the code but it is a little messy..
Turn your borders on so you can see what is happening. is the table in the correct spot? does your "blah" text getting into that table?.
Do you have a test url?..
The double </td> was a typo before, I was remote controlling the PC that I was working on and couldn't cut'n'paste..
I'm back at my desk now so:.
Code from test page:.
<p>With pre tag in a table 475px wide:</p>.
Response.write("<table width=475 border=1><tr><td><pre width=80>"& summary &"</pre></td></tr></table>").
<p>With no pre tag in a table 475px wide:.
Response.write("<table width=475 border=1><tr><td><p>"& summary &"</p></td></tr></table>").
As you can see the table is the correct size, but the pre tags make it extend past it's fixed width.
I'm thinking that I'm going to have to write something to break the strings correctly or even asc() each character and look for cr/lf..
I've found that scrapping <pre> and instead using:.
Solves my problem..
Thanks for the advice.
Actually that first table is correct. that is what the pre tag does, shows the text how it is, you have to manually enter the paragraph breaks in order to get the correct line breakage..
It was working correctly just not how you wanted..
Glad you got it to work...
Sure, but the width=80 attribute should have limited it to 80 characters, right?.
I don't beleive so as that would make the pre tag not a pre tag. by definition it is a tag for preformatted stuff so it shows it how it is. if you limit it then it might not work as expected. which you found out..
Actually width=80 has nothing to do with how many characters it will hold, that number is in pixels, not all font is a letter a pixel...
I think the 'width' attribute which I was trying to use is non-functional in IE6 for reasons which you state (makes sense really)..
Width = number [CN].
This attribute provides a hint to visual user agents about the desired width of the formatted block. The user agent can use this information to select an appropriate font size or to indent the content appropriately. The desired width is expressed in number of characters. This attribute is not widely supported currently..
Well there you go. I don't use width in a pre tag so I was wrong on saying it was a width and not characters. makes sense..