April 24, 2012

html comment box cutting text without going onto new line

Question by lukey

enter image description here

when i insert a comment more than the set width (600px) the text will just cut off (see image link above) instead of going onto a new line. I am using html comment box.
the style for the comment box is:

 #HCB_comment_box div.comment {
  border-top:1px solid #fff;
  width: 600px;

  }

Answer by Starx

Use the word-wrap property

#HCB_comment_box div.comment {
   word-wrap: break-word;
}

Demo

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!