2016-12-06 63 views
0

我創造,我想多<tr><td>給予不同的寬度不同的TD表

這裏表一個Web應用程序是我的代碼

<tr> 
    <th style="width:30px;">date</th> 
</tr> 
<tr> 
    <td>10-10-2016</td> 
</tr> 

它工作得很好,直到我再添TR

<tr> 
    <td style="width:200px;">Expense incurred towards sessions</td> 
</tr> 

是在增加我的日期(日,TD)的寬度,否則它顯示我的其他TD像

費用

發生

會議

我不想增加我的約會TD的寬度,但希望我的第二個TD是在同一行

向會話發生的費用小號

這樣我需要怎麼CSS這個

這是我的表

<table id="table" ng-hide="hidetable" class="table font" style="width:100%; 
margin-top:30px; padding-top:10px;"> 
+0

編輯的問題 –

回答

1

這是否像什麼你後? Here is morecolspan=" "屬性用於實現此目的。

<table id="table" ng-hide="hidetable" class="table font" style="width:100%; 
 
margin-top:30px; padding-top:10px;"> 
 
<tr> 
 
    <th style="width:30px;background-color:#f2f2f2;">date</th> 
 
    <td style="background-color:#f2f2f2;">10-10-2016</td> 
 
</tr> 
 
<tr> 
 
    <td colspan="2" style="background-color:#f2f2f2;">Expense incurred towards sessions</td> 
 
</tr> 
 
    </table>

0

嘗試:

<table> 
    <tr> 
     <th style="width:30px;">date</th> 
    </tr> 
    <tr> 
     <td>10-10-2016</td> 
    </tr> 
    <tr> 
     <td colspan="2">Expense incurred towards sessions</td> 
    </tr> 
</table>