2017-08-30 23 views
1

我正在處理HTML表格,但行高有問題。HTML內聯CSS表格行高? (圖像不同步)

我只能訪問內聯CSS,這就是我這麼遠:

<table style="width: 100%;"> 
    <tbody> 
     <tr> 
      <th></th> 
      <th></th> 
      <th>Nominal TEU tdw</th> 
      <th>LOA m</th> 
      <th>Breath m</th> 
      <th>Depth m</th> 
      <th>Draft m</th> 
     </tr> 
     <tr> 
      <td> 
        <strong>OOCL HONG KONG</strong> 
        <strong>6 units in series</strong> 
        <strong>from May 2017</strong> 
      </td> 
      <td style="text-align: center;"><img class="" src="<website>/OOCL-HONG-KONG.png" alt="OOCL HONG KONG" /></td> 
      <td> 
       <p style="text-align: center;"><strong>21,413 teu</strong></p> 
       <p style="text-align: center;">191,317 tdw</p> 
      </td> 
      <td style="text-align: center;"><strong>399.9</strong></td> 
      <td style="text-align: center;"><strong>58.8</strong></td> 
      <td style="text-align: center;"><strong>32.5</strong></td> 
      <td style="text-align: center;"><strong>16.0</strong></td> 
     </tr> 

Here is an image of the issue. The top is how it currently is, the bottom is what I'm struggling to achieve

有沒有人遇到過這一點,並知道解決辦法?

非常感謝

+0

所以,你需要的圖片在底部?嘗試'vertical-align:bottom;'。 – Huelfe

回答

0

你可以試試這個:valign="bottom"爲@Huelfe說一樣,vertical-align:bottom他回答當我試圖創建片段

<table style="width: 100%;"> 
 
<tbody> 
 
<tr> 
 
<th></th> 
 
<th></th> 
 
<th>Nominal TEU 
 
tdw</th> 
 
<th>LOA 
 
m</th> 
 
<th>Breath 
 
m</th> 
 
<th>Depth 
 
m</th> 
 
<th>Draft 
 
m</th> 
 
</tr> 
 
<tr> 
 
<td valign="bottom"><strong>OOCL HONG KONG</strong></td><td style="text-align: center;"><img class="" src="<website>/OOCL-HONG-KONG.png" alt="OOCL HONG KONG" /></td><td style="text-align: center;" valign="bottom"><strong>21,413 teu 
 
</strong> 
 
</tr> 
 
<tr> 
 
<td> 
 
<strong>6 units in series</strong><strong>from May 2017</strong></td> 
 
<td></td> 
 
<td> 
 
<p style="text-align: center;">191,317 tdw</p> 
 
</td> 
 
<td style="text-align: center;"><strong>399.9</strong></td> 
 
<td style="text-align: center;"><strong>58.8</strong></td> 
 
<td style="text-align: center;"><strong>32.5</strong></td> 
 
<td style="text-align: center;"><strong>16.0</strong></td> 
 
</tr> 
 
</table>