Tutorial :How to word wrap


How would I be able to have word wrap when text in <a> is way too long? I want the <li> to expand to the word wrap using CSS.


Are you looking for the word-wrap property?

<ul>      <li>          <div style="word-wrap: break-word;">              <a></a>          </div>      </li>  </ul>  


Not exactly sure what you're after here, but the CSS3 text-wrap or word-wrap might do it.

You could also try setting a width on the <li>. That would force the text inside it to a certain width.

Finally, if the text does not contain spaces/wrappable chars, perhaps <wbr> might work

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »