Author Topic: Any HTML gurus on?
gatzby 
Title: Insanity Personified
Posts: 5,770
Registered: Jul 26, '01
Extended Info (if available)
Real Post Cnt: 4,742
User ID: 281,513
Subject: Any HTML gurus on?
I have the following line of markup:

<object id="test" data="test.txt" type="text/plain" width=50% height=100%></object>

the test.txt is an unformatted text file.

In Firefox when I set the width, the text wraps to the next line just the way I want it.
In IE the text is on one line and gives me a scroll bar.

Is there a way to force my stupid IE to wrap the text? This is driving me crazy.

 

-----signature-----
Radio Shack TRS 80 | 640k | 5.25 Drive INTEGRATED!
A stretched thread = A useless thread
Link to this post
Arc_DT 
Title: Mithan said I am smart
Posts: 11,647
Registered: May 28, '02
Extended Info (if available)
Real Post Cnt: 11,518
User ID: 683,353
Subject: Any HTML gurus on?
Worst case scenario, you'd need to encode the carriage returns in the text file to be LF+CR, but this is almost certainly an encoding problem where Explorer can't tell which encoding you're using. What program did you use to create the text file? Make sure it's saved as "UTF-8" for the highest level of compatibility, though "Windows-1252" should work as well.

You could also have a case where your web server is incorrectly identifying the encoding in the HTTP header. If this is being served by vanilla Apache then that shouldn't happen (it shouldn't identify the encoding at all and leave it to the browser to decipher), but other servers, modules, and server scripts might include an encoding.

The one place I'm fairly certain isn't the issue is your <object> tag, though you might want to give a specific height in pixels instead of "100%" just to be certain. A % on height is not allowed in the spec, but it's generally Explorer who'd be happy to show it and other browsers who would reject it. A % on width is in the spec and is not the source of the problem.

 

-----signature-----
"... We just need a president to sign this stuff... Pick a Republican with enough working digits to handle a pen to become president."
-Grover Norquist
.
MICHIGAN - Where the trees are the right height!
Link to this post
gatzby 
Title: Insanity Personified
Posts: 5,770
Registered: Jul 26, '01
Extended Info (if available)
Real Post Cnt: 4,742
User ID: 281,513
Subject: Any HTML gurus on?
I have it saved as UTF - 8 format.

I think I solved my issue with some clever javascript and use of textarea happy

YAY

 

-----signature-----
Radio Shack TRS 80 | 640k | 5.25 Drive INTEGRATED!
A stretched thread = A useless thread
Link to this post

Valid XHTML 1.0 Transitional Powered by PHP