rss
twitter

Wednesday, May 09, 2012

Text Wrapping in Html Pre tag

When using "PRE" tag to show the values in page , if the lines is two it won't wrap in the page it will lead to a page alignment problems.
here is the fix to overcome this problem. i tried this code and checked in major browsers. it works for me
pre {
 white-space: pre-wrap;       /* css-3 */
 white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 white-space: -pre-wrap;      /* Opera 4-6 */
 white-space: -o-pre-wrap;    /* Opera 7 */
 word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

thanks 'adambox' Any comments in this is welcomed

Bookmark and Share

3 comments:

jessikax January 25, 2013 at 3:27 AM  
This comment has been removed by a blog administrator.
midn April 18, 2019 at 1:28 AM  
This comment has been removed by a blog administrator.
shahdkhan December 16, 2019 at 4:28 AM  
This comment has been removed by a blog administrator.

Post a Comment

Tech World

Label Cloud

Must Buy

  © Blogger templates by Ourblogtemplates.com updated with zenplate.com tips

Back to TOP