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

1 comments:

VOIP ACNE January 25, 2013 at 3:27 AM  
This comment has been removed by a blog administrator.

Post a Comment

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

Back to TOP