2012-06-12 29 views
1

我有一个表,当我点击列头分别得到的数据进行排序的一个。点击的列在列名之前获得箭头(这是行式图像)。当列名太长,并且列被点击进行排序以便它具有图像子弹时,当设置了white-space: normal时,图像在文本上方。这是我期望的。这是在Chrome和IE中发生的情况,但在Firefox v11 +中不是这种情况。在Firefox中,图像箭头超出了文本前面<th>的范围。任何建议,使其在Firefox和IE浏览器中工作?CSS空白和列表样式图像不叠加在Firefox 11+

这里有一个例子:
HTML

th.tableValue { 
    background-color: #8DA7BE; 
} 

th, th.tableValue { 
    background-position: center top; 
    background-repeat: repeat-x; 
    border: 1px solid #8DA7BD; 
    color: #FFFFFF; 
    font-size: 9pt; 
    height: 33px; 
    padding-left: 2px; 
    padding-right: 2px; 
    text-align: center; 
    white-space: normal; 
} 

.tableValue { 
    color: #728DAB; 
    text-align: center; 
    white-space: normal; 
    width: 100px; 
} 

.sorting_asc { 
    list-style-image: url("../img/sort-asc.gif"); 
    list-style-position: inside; 
    list-style-type: inherit; 
} 

+0

请发表拨弄箭头图像 – Dipak

回答

2

你使用任何reset.css

<table class="tableCustom" cellspacing="0" cellpadding="0" border="0"> 
    <thead> 
     <tr> 
      <th class="tableValue sorting_asc"> 
       <ul> 
        <li>Some unnecesseary long Column Name</li> 
       </ul> 
      </th> 
     </tr> 
    </thead> 
</table> 


CSS?如果不 。

Here you can find many links for the reset.css

如果问题仍然存在,请提供jsFiddle

编辑:::之所以使用reset.css是因为它将使所有的用户代理(浏览器)的CSS的基础设置,让他们在不同的浏览器中看起来不一样。

+0

谢谢,我不使用reset.css。我会试试看。我试图提供一个jsFiddle,但由于许多依赖关系,在这种情况下是不可能的。 – nyxz