我很难弄清楚发生了什么以及如何解决它。
我有一些 div 包含一些在显示表格数据时导致宽度问题的图标。如果我删除包含图标的 div,行宽将按照我想要的方式结束(请参阅下面的 firefox 示例)。
这是我想要的 Firefox 中的视图(注意用红色圈出的图标的位置,它在相同的 y 坐标或附近对齐): alt text http://www.redsandstech.com/ff_display.jpg
这是 IE7 中的视图(注意图标和灰线的宽度,即表格行): alt text http://www.redsandstech.com/ie_display.jpg
这是HTML:
<table>
<tbody>
<tr>
<td>
<span>stuff 1</span>
<span>stuff 2</span>
<div class="prop_edit"><img class="img_height14" src="edit.jpg"></div>
<div class="prop_archive"><img class="img_height14" src="archive.jpg"></div>
<div class="prop_delete"><img class="img_height14" src="delete.jpg"></div>
<div style="display:none;">
<div>Links Here</div>
</div>
</td>
</tr>
</tbody>
继承人的CSS:
.prop_edit{
float:right;
position: relative;
top: 0px;
right:50px;
}
.prop_archive{
float:right;
position: relative;
top: 0px;
right:10px;
}
.prop_delete{
float:right;
position: relative;
top: 0px;
right: -30px;
}
.img_height14{
height:14px;
vertical-align:top;
position:relative;
}
我已经尝试了一堆不同的 CSS 东西,但实际上我只是想弄清楚一些事情。有人有一些可以帮助我的提示吗?
提前致谢。