我试图在一行上获得三张图像,一张左对齐,一张居中,最后一张右对齐。我已经决定使用单行表来完成它,但是很难让图像在它们各自的单元格中居中。
有没有比我选择的更好的方法?我不打算使用该<td align="center">属性,因为它在 HTML5 中已被弃用,所以我正在寻找一种使用 CSS 的方法。这就是我目前所拥有的(我已将表格边框属性设置为“1”,因此我可以看到单元格内的图像对齐方式如何呈现):
<style>
  .centre_image
  {
  float:center;
  }
</style>
<body>
<table border="1">
    <tr>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/lawfirms.svg">   
          <img src="images/lawfirms.png" alt=""/>     
        </object>
    </td>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/industry.svg">     
          <img src="images/industry.png" alt=""/>     
        </object>
    </td>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/in-house.svg">     
          <img src="images/in-house.png" alt=""/>     
        </object>
    </td>
    </tr>
</table>
这在 Ubuntu 上的 Firefox 19.0 中给出了以下结果:

在 Chrome 25.0 中出现以下结果: 

编辑 - 这是在 j08691 的答案中进行更改后的完整 HTML:
<!DOCTYPE html>     
<html xmlns="http://www.w3.org/1999/xhtml">     
<head>
<meta charset="UTF-8"/>     
<title>SVG Included with <object> tag</title>
<style>
.centre_image
{
text-align:center;
}
</style>
</head>
<body>
<table border="1" style="width:100%">
    <tr>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/lawfirms.svg">   
          <img src="images/lawfirms.png" alt=""/>     
        </object>
    </td>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/industry.svg">     
          <img src="images/industry.png" alt=""/>     
        </object>
    </td>
    <td class="centre_image">
        <object type="image/svg+xml" data="images/in-house.svg">     
          <img src="images/in-house.png" alt=""/>     
        </object>
    </td>
    </tr>
</table>
 </body>
</html>
这是 Naresh Kumar 回答的结果:
