Can I prevent text in a div block from overflowing?

Gjr picture Gjr · Jul 22, 2009 · Viewed 284.2k times · Source

Can I prevent text in a div block from overflowing?

Answer

Amalgovinus picture Amalgovinus · Sep 24, 2010

If you want the overflowing text in the div to automatically newline instead of being hidden or making a scrollbar, use the

word-wrap: break-word

property.