本文介绍了如何在Internet Explorer中使用表格单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...我想问一下,为什么属性表格单元无法正常工作并且在中间未垂直对齐?
现在我有这个结构,我希望这个结构的图像居中对齐...它可以在其他浏览器中正常工作,但是当它不起作用时,就是我的html的结构...

Hi guys... I would like to ask why is it that the property table-cell is not working properly and not aligning vertically in the middle?
right now i have this structure and i want the images for this structure to be align center... it working in other browser properly but when it comes to ie its not working here is the structure for my html...

<div id="logos">
   <ul>
      <li><img src="image1.jpg" /></li>
      <li><img src="image2.jpg" /></li>
   </ul>

</div>



所以我希望图像在中间垂直对齐(假设image2的高度大于image1的高度.假设image2的高度为100px,image2的高度为40px)

这是我的CSS样式



so i want the images to be vertically aligned in the middle (assuming image2 has a bigger height than image1. assuming image2 has a height of 100px and image2 has a height of 40px)

and here is my css styling for this

#logos ul{
  display: table;
  height: 100px;
  margin: 0;
  padding: 0;
  text-align: center;
}
#logos ul li{
  display: table-cell;
  list-style: none outside none;
  padding-right: 15px;
  text-align: center;
  vertical-align: middle;

}


我在除IE及其工作以外的其他浏览器上对此进行了测试,但是当谈到IE时,我感到非常沮丧...我似乎无法使表格单元属性正常工作...任何帮助都将是个好人...谢谢


i tested this on other browser other than IE and its working but im so frustrated when it comes to IE... i cant seem to make table-cell property work properly... any help will be great guys... thanks

推荐答案


这篇关于如何在Internet Explorer中使用表格单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 11:45