File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Word Wrap But .... 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 "Word Wrap But ...." Watch "Word Wrap But ...." New topic
Author

Word Wrap But ....

Adnan Memon
Ranch Hand

Joined: Mar 09, 2003
Posts: 32
I want word wraping in pre tag...i saw Eric's solution but in IE it is breaking words too which is annoying ... is there any css/html which wraps text in pre tag but not break words in IE.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
pre is just that, preformated text that is parsed as-is by your browser.
You MAY get somewhere by putting the pre section inside a div and giving the div a fixed width.


42
Adnan Memon
Ranch Hand

Joined: Mar 09, 2003
Posts: 32
If we run eric's solution in netscape navigater it works fine there are no word breaks...then how about IE..why its behaviur is not just like that of navigator. Would u pls give an example of what u mentioned(div in pre).
 
IntelliJ Java IDE
 
subject: Word Wrap But ....
 
Threads others viewed
UBB Code eye strain
Search Engine thru servlets,File Downloading
Formatting text coming from a text area
Wrap attribute in PRE
Use of pre tag avoids word wrapping
developer file tools