Paragraph crossing Div width |
Paragraph crossing Div width |
indela |
Jul 23 2012, 05:00 AM
Post
#1
|
Group: Members Posts: 2 Joined: 23-July 12 Member No.: 17,481 |
Hi all i am design a page for comment page. I had give a with for DIV tag was 270px and my P tag is 250px. when i give paragraph without space paragraph cross the my div tag width its not come to next line. Paragraph was like this <p& gt;hellothisissrenivasulufromnellorethi,sthingkjhdfhghgfdd,kjgjkghjkhjk,ghdfjhfk
jg</p>. Please help me how to fit my paragraph with in DIV object width . body { padding: 0; margin: 1px 2px 2px 1px; width: 270px; min-height:100%; background:#FFFFFF; border-left:1px solid #dddddd; height:100%; } #comments { width: 270px; padding: 4px 4px 6px 6px; background: #EFF3F8; } |
Frederiek |
Jul 23 2012, 06:32 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
You can use word-wrap:break-word; for that.
See also http://www.w3schools.com/cssref/css3_pr_word-wrap.asp |
indela |
Jul 23 2012, 09:00 AM
Post
#3
|
Group: Members Posts: 2 Joined: 23-July 12 Member No.: 17,481 |
You can use word-wrap:break-word; for that. See also http://www.w3schools.com/cssref/css3_pr_word-wrap.asp Thank you very much Frederiek its working perfect...... This post has been edited by indela: Jul 23 2012, 09:01 AM |
Frederiek |
Jul 24 2012, 03:44 AM
Post
#4
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
You're welcome.
|
Lo-Fi Version | Time is now: 24th April 2024 - 06:16 PM |