我有一個固定的寬度div,我需要將中間的兩個td居中。 這裏是我的小提琴:http://codepen.io/anon/pen/YyrOZm固定寬度div中的中心td
HTML:
<div class="managed-form">
<table>
<tr>
<td>
<label title="Company">
Company
</label>
<input size="30" type="text">
</td>
<td>
<label title="Title">
Title
</label>
<input class="" name="Title" size="30" type="text" value="">
</td>
</tr>
<table>
</div>
CSS:
.managed-form{
background-color: #5B8F22;
width: 311px;
height: 369px;
}
你有[無效html](http://www.w3schools.com/tags/tag_td.asp) – Alex
@alirezasafian修復它 –