Wednesday, August 11, 2010

Wrapping Text Using CSS

If you want to wrap some text, even if it is a very long word just like bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
you can wrap it up in any given width using a CSS attribute called "word-wrap" its value in this case should be "break-word"

Here is a code example

<div style="width:20px;">
<h5>
<a style="color:#ED145A;word-wrap:break-word;" href="http://mywavingthoughts.blogspot.com/">
MyWavingThoughts
</a>
</h5>
</div>

and the result


No comments:

Post a Comment