Quiero usar la propiedad de desbordamiento de texto en un enlace. Trabajo para un párrafo pero no para un enlace.text-overflow: puntos suspensivos en un enlace
Aquí está el código HTML
<div>
<ul>
<li>
<p>the text is too long</p>
</li>
<li>
<a href="javascript:alert('test')">the link is too long</a>
</li>
</ul>
</div>
Aquí está el código CSS:
a {
white-space: nowrap;
width:50px;
overflow: hidden;
text-overflow: ellipsis;
}
p {
white-space: nowrap;
width:50px;
overflow: hidden;
text-overflow: ellipsis;
}
Ver ejemplo en http://jsfiddle.net/corinnekm/LLVDB/
Gracias mucho por su ayuda.
Gracias, @Gilles, me ha ayudado mucho. – eyalewin