VaultNetwork.net Vault Network Boards
Author Topic: Any HTML gurus on? [Locked]
gatzby  1 star
Title: Insanity Personified
Posts: 86
Registered: 2001-7-26 17:49:19
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
Arc_DT  2 stars
Title: Mithan said I am smart
Posts: 363
Registered: 2002-5-28 08:25:51
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!
gatzby  1 star
Title: Insanity Personified
Posts: 86
Registered: 2001-7-26 17:49:19
I have it saved as UTF - 8 format.

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

YAY

 

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

VaultNetwork.net is an independently operated community forum and is not affiliated with, endorsed by, or technically based on IGN, GameSpy, FilePlanet, GameStats, or the former IGN/GameSpy Vault Network.
References to VaultNetwork.net mean this site/domain. VNBoards-style presentation is a visual homage only. By using this site, you agree to the forum rules.