我将使用这个CSS/HTML组合来模拟一个双栏布局:
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="two-cols">
<div class="left-col">
<img src="http://stott.customer.netspace.net.au/images/aurora2.jpg" alt="Image"/>
</div>
<div class="right-col">
Text
</div>
</div>
</body>
</html>
CSS
.two-cols {
border: 1px solid black;
display: table;
width: 100%;
}
.left-col, .right-col {
display: table-cell;
width: 50%;
}
img {
width: 300px;
height: 200px;
padding: 0;
margin: 0;
}
请点击这里查看JSBin。
但是我的图片底部有不必要的填充: