Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes Use of pre tag avoids word wrapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Use of pre tag avoids word wrapping" Watch "Use of pre tag avoids word wrapping" New topic
Author

Use of pre tag avoids word wrapping

Periakaruppan Thiagarajan
Ranch Hand

Joined: Jul 26, 2005
Posts: 65
Hi,
I have used the pre tag to display dynamic content in pre-formatted text. But this avoids word wrapping which leads to horizontal scroll bar appearing in the screen. Is any other way to avoid this?

Thanks,
Pk
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
because that is what the pre tag does!

Look into CSS with word wrap and try setting a width.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of pre tag avoids word wrapping
 
Similar Threads
Word Wrap But ....
Wrap attribute in PRE
Word wrpa problem in Mozilla
Formatting text coming from a text area
Verbatim in Javadoc