tags:

views:

126

answers:

2

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.

+1  A: 

Are you looking for the word-wrap property?

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

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

cofiem