Hello friends, i just create a comment form but here is some problem in this.. First is when user post a comment then its display in single line.... Second is After adding <pre> tag its going on a single line and increase page width too.. Like as i have a Page with width 1000 pixel. two side bars one is 300px width and second is 160px.. Now Site Body is left 600 or something.. Normal Looks Like This.. | | | | | | | | | | | | | | | | After Adding long Comment with <pre> tag, its format changed | | | | | | | | | | this is comment with long text no line breaks | | | | | | <----Page and body Width Increased.. Greater then 1000-------> I want its automaticly breaks when its reach end of body table Like this | | | | | |this is a | | | |comment | | | |with long | | | |text no | | | |Line | | | |breaks | | Any suggetions will be helpful... Thanks!!
Add this to your css: pre { white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */ white-space: -pre-wrap; /* Opera */ white-space: -o-pre-wrap; /* Opera */ white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) [URL]http://www.w3.org/TR/css3-text/#white-space[/URL] */ word-wrap: break-word; /* IE 5.5+ */ } Code (markup): Source: http://stackoverflow.com/questions/1634203/pre-tag-in-html-with-fixed-width