The moose likes HTML, CSS and JavaScript and the fly likes text align Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "text align" Watch "text align" New topic
Author

text align

muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
Hi,
I have to present huge amount of text in HTML format. I am reading the entire string from the Database. The text may have sub sections and code blocks.
I want to wrap the text within the size of the monitor(don't worry about the resolution) window at the same time I dont want to loose the format also, because code snippets come in between the text. I tried with <PRE> tag with the attribute width, but it is keeping the format as it is without wraping the text. Later I saw the width attribute of PRE tag got deprecated. Can you please suggest me any other tag/attribute for my requirement.
FYI I am using IE6.0.
Thanks,
Muruges
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
I answered this here:
http://www.coderanch.com/t/114515/HTML-JavaScript/prob-pre-tags
muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
Thanks for the reply. It is working well. Is it possible to set the style dynamically based on the browser type like IE and Netscape. I am too greedy
muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
Sorry, for the above requirement. If we put all the style attributes then it will work in all the browsers.
Thanks once again.
muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
Hi Eric,
The style attribute is working correctly in IE. I am sending that html file as mail. When I was viewing the mail in outlook the text was not wrapped. any ideas?
My customers are using outlook 2000 and above.
Thanks for your help.
Thanks,
Muruges
 
 
subject: text align
 
Threads others viewed
prob with pre tags
HTML - Align : Justify
Wrap attribute in PRE
quote symbol expected problem
css not working in JSF
MyEclipse, The Clear Choice