How to fit text content within div for horizontally

In order to fit text into div and avoid overflowing text to next div, just add style attribute to your div:

style="word-wrap: break-word"

This is especially handy when you use <h1>-<h6> tags within divs.

Leave a Reply