0
我试图将表格中的图像置于中心位置。我可以将它固定在单元格的底部或水平居中,但不能同时执行两个动作。是因为相对/绝对位置? 中心跨度在表格单元格
<body>
<style>
#sum td{
\t position:relative;
\t text-align:center !important;
\t vertical-align: center;
\t width:400px;
\t }
#sum tr{
\t height:280px;
\t }
#sum td span{
\t position:absolute;
\t bottom:0;
\t display:block;
\t text-align:right;
\t }
</style>
<content>
\t <div>
\t \t <ul>
\t \t \t <table id="sum"> \t
\t \t \t \t <tr>
\t \t \t \t \t <td class="col-md-4">
\t \t \t \t \t \t <li><img class="pic"src="#">
\t \t \t \t \t \t <span>xxx
\t \t \t \t \t \t </span>
\t \t \t \t \t \t </li>
\t \t \t \t \t </td>
\t \t \t \t </tr> \t
\t \t \t </table>
\t \t </ul>
\t </div>
</content>
</body>
的probem是我有不同大小的图像,我必须包括关于底部位置的线的另一种方式的文本没有垂直对准。 –
@AnnaŠtulcová我不明白。一定要在OP中明确指出问题,这样我们就不会浪费彼此的时间。你没有提到其他图像,为什么你必须使用底部定位,或任何关于你的OP垂直对齐。 –