Css Wordpress插入不需要的单元格填充
在wordpress中,我没有任何意义的填充 我用自定义css:padding:0 margin:0格式化一个表,在标记td、tr、tbody中。 在单元格内,我插入一个带填充的输入[文本]:0边距:0宽度:100%高度:100%。在单元格边框和输入框之间仍然有一些空间 使用Chrome或Safari inspector测试TD时,我在图形视图中看到一个计算出的填充空间,但style inspector告诉我填充为零 发生了什么事 这是页面代码:Css Wordpress插入不需要的单元格填充,css,wordpress,Css,Wordpress,在wordpress中,我没有任何意义的填充 我用自定义css:padding:0 margin:0格式化一个表,在标记td、tr、tbody中。 在单元格内,我插入一个带填充的输入[文本]:0边距:0宽度:100%高度:100%。在单元格边框和输入框之间仍然有一些空间 使用Chrome或Safari inspector测试TD时,我在图形视图中看到一个计算出的填充空间,但style inspector告诉我填充为零 发生了什么事 这是页面代码: <table> <th
<table>
<thead>
<tr>
<td>
Room
</td>
<td>
Uscita
</td>
<td></td>
</tr>
</thead>
<tbody>
<tr>
<td class="insertCellStyle">
<select class="insertCellStyle" id="Location">
<option value="1">
Room A
</option>
<option value="2">
Room B
</option>
<option value="3">
Mensa
</option>
<option value="4">
Menza
</option>
</select>
</td>
<td class="insertCellStyle">
<input type="text" class="insertCellStyle" style="height:100%; width:100%;" id="Exit">
</td>
<td>
<input type="button" value="inserisci" id="Insert" class="insertCellStyle">
</td>
</tr>
</tbody>
</table>
检查td中的所有元件是否具有相同的高度?我认为其中一个元素会有额外的高度,我会影响所有其他td高度。如果td中有图像或按钮,请降低高度,看看是否有效。你可以发布一个代码片段或链接到网站,再现问题吗?完整的代码在上下文中还是没有发生。代码添加。将样式添加到自定义CSS中并使用此代码创建新页面就足够了。
.insertCellStyle {
padding: 0px;
margin: 0px;
color: black;
}
td.insertCellStyle {
vertical-align: top;
display: table-cell;
}
input[type="text"].insertCellStyle {
padding: 0px;
margin: 0px;
width: 100%;
height: 100%;
}