Wrap text through CSS

Wrapping text through CSS is quite a necessary evil when your Analyst come up with jargons that stretches 15-20 charactors… 😉

So here’s the deal. If you need to wrap text through CSS, you can use the CSS selector defined below:

Wrap words through CSS

/* In CSS */
 white-space: -moz-pre-wrap !important;  /* Mozilla, since 1999 */
 white-space: -pre-wrap;      /* Opera 4-6 */
 white-space: -o-pre-wrap;    /* Opera 7 */
 white-space: pre-wrap;       /* css-3 */
 word-wrap: break-word;       /* Internet Explorer 5.5+ */

/* In HTML */
<td class=”wrapword”> … </td>

Hope this helps!

Feel free to leave a reply here...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: