我使用以下代码片段将多个div与td
对齐<style type="text/css">
td {
border-collapse: collapse;
border-style: solid;
border-width: 1px 1px 1px 1px;
display: table-cell;
overflow: hidden;
/*padding: 0.7em;*/
height: 30px;
white-space: nowrap;
width: auto;
vertical-align: middle;
-moz-box-sizing: border-box!important;
box-sizing: border-box !important;
-webkit-box-sizing: border-box !important;
}
.e-gridtreeexpand {
width: 0;
height: 0;
border-bottom: 10px solid black;
border-left: 10px solid transparent;
}
.e-gridtreecollapse {
width: 0;
height: 0;
border-top: 5px solid transparent;
border-left: 10px solid black;
border-bottom: 5px solid transparent;
} </style>
<div style="height:30px;width:200px;">
<table>
<tr>
<td><div><div class="intend" style="height:1px; float:left; width:0px;"></div><div class="e-gridtreeexpand" style="float: left"></div><form style="width: 100%; height: 100%;" id="ejGridTreeGridEditForm"><input style="width: 100%; height: 100%;" name="taskId" id="ejGridTreeGridtaskId" value="1" class="e-field e-ejinputtext"></form></div></td>
</tr>
</table>
</div>
如何在td
中水平对齐此div答案 0 :(得分:1)
请检查JSFiddle url,
<div style='float:right'><form style="height: 100%;"></form></div>