<style> .ac { display: inline-block; 80px; word-break: keep-all; overflow: hidden; text-overflow: ellipsis; } .ac:hover { word-break:normal; 100px; display:block; white-space:pre-wrap; word-wrap : break-word; overflow: hidden; } </style> <span class='ac'>"+ colres[keys].account + "</span>