Html 方格盒垂直对齐中间不在td中工作
我希望复选框垂直对齐中间,其他元素垂直对齐顶部,但它不起作用。我尝试使用高度:100%,它在chrome中运行良好,但在IE中不行 html:Html 方格盒垂直对齐中间不在td中工作,html,css,internet-explorer,cross-browser,Html,Css,Internet Explorer,Cross Browser,我希望复选框垂直对齐中间,其他元素垂直对齐顶部,但它不起作用。我尝试使用高度:100%,它在chrome中运行良好,但在IE中不行 html: 你可以用这样的东西 td{ 文本对齐:居中; 垂直对齐:顶部; } .购物车信息检查{ 文本对齐:居中; 垂直对齐:中间对齐; } 您可以使用类似的方法 td{ 文本对齐:居中; 垂直对齐:顶部; } .购物车信息检查{ 文本对齐:居中; 垂直对齐:中间对齐; } 垂直对齐属性适用于容器元素,在本例中为td。它描述了如何在容器中对齐元素。什么是购物
你可以用这样的东西
td{
文本对齐:居中;
垂直对齐:顶部;
}
.购物车信息检查{
文本对齐:居中;
垂直对齐:中间对齐;
}
您可以使用类似的方法
td{
文本对齐:居中;
垂直对齐:顶部;
}
.购物车信息检查{
文本对齐:居中;
垂直对齐:中间对齐;
}
垂直对齐属性适用于容器元素,在本例中为td。它描述了如何在容器中对齐元素。什么是购物车信息的CSS?表格使用表格布局:固定.cart\u info\u td{vertical align:top;width:400px;text align:left;}
因此td
中的所有元素都将具有vertical align:top
垂直对齐属性应用于容器元素,在本例中为td。它描述了如何在容器中对齐元素。什么是购物车信息的CSS?表格使用表格布局:固定.cart\u info\u td{vertical align:top;width:400px;text align:left;}
因此td
中的所有元素都将具有垂直对齐:top
<td class="cart_info_td">
<input type="checkbox" class="cart_info-check">
<a href="#"><img src="images/dynamic/product.jpg" class="cart_info-pic"></a>
<a href="#">product's title</a>
</td>
.cart_info-check {
vertical-align: middle;
//height: 100%;
margin-left: 10px;
margin-right: 10px;
}