溢出:IE8隐藏的服装额外空间?

时间:2013-01-23 14:48:23

标签: javascript html internet-explorer

我有以下HTML代码

<div id="tabsDiv" >
    <ul id="myTabs" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
            <a href="#ui-tabs-2">Testing it for creation  Testing it for creation subject Testing it for creation subject 
            Testing it for creation  Testing it for creation  Testing it for creation subject Testing it 
            for creation  Ends here</a>
            <a>
        </li>
    </ul>
</div>

这是css代码

#myTabs li a {
  font-size: 9pt;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

}

我遇到问题,在这种情况下,我有大型超链接测试它.....结束这里。会发生什么是css只显示那些字符 适合内部200px加3点,但它不必要地消耗完整文本的空间。所以如果我添加另一个li标签它将在大空间后开始。它在IE9,FF,Chrome中运行良好但在IE8中没有?

1 个答案:

答案 0 :(得分:0)

尝试添加display:blockinline-block Check it out on JSFiddle