IE10 text-overflow ellipsis not working

我与影子孤独终老i 提交于 2019-11-29 16:20:43

First of all, div is a block level element and a is an inline level element, so you cannot use a div inside an anchor tag b...so you should use any other inline tag (like small , span etc)

Secondly, if you have to use a div inside div, you can wrap your text in another tag like this ....

<div class=boxed>
     <h1>text-overflow Attribute Sample</h1>
     <div class="caption">
         <!----><div style=" width:100px;height:20px;border: 1px solid red"></div>
         <span class='textTrunc'>Each box (div element) below contains the following text:</span>
  </div>

and css of class textTrunc:

.textTrunc{  
    overflow:hidden;  
    white-space: nowrap;  
    text-overflow: ellipsis;  
    display:block;  
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!