Asv3's Blog

October 7, 2009

Wrapping long words using CSS

Filed under: Uncategorized — Tags: , , , — asv3 @ 10:46 pm

one of my colleague came up with this problem, he wanted a long word to be wrapped within given width. overflow hidden was helping us to hide un-wrapped part the big word, finally I figured out using word-wrap:break-word will do the trick. It did work in Firefox and IE6 browsers but not in Opera, so we decided to use overflow:hidden with word-wrap, so that in Opera we hide un-wrapped part of that word, and it wraps neatly in other browsers.

Create a free website or blog at WordPress.com.