我如何重复这一点,以某种方式明确不会使布局在另一个下面?
<div class="grid_3 alpha"></div><div class="grid_2"></div><div class="grid_11"></div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"></div><div class="grid_2"></div><div class="grid_11"></div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"></div><div class="grid_2"></div><div class="grid_11"></div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"></div><div class="grid_2"></div><div class="grid_11"></div>
<div class="clear" style="height:20px"></div>
答案 0 :(得分:2)
尝试在空格子div中放置
。使用空的960.gs网格div有一些跨浏览器的问题。
编辑:以下在Firefox和Chrome中完美运行。也许你的doctype或容器元素不对?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>960 Grid System — Test</title>
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/960.css" />
<style type="text/css">
div.grid_3 { background-color: #0f0; }
div.grid_2 { background-color: #f00; }
div.grid_11 { background-color: #00f; }
</style>
</head>
<body>
<div class="container_16">
<div class="grid_3 alpha"> </div><div class="grid_2"> </div><div class="grid_11"> </div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"> </div><div class="grid_2"> </div><div class="grid_11"> </div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"> </div><div class="grid_2"> </div><div class="grid_11"> </div>
<div class="clear" style="height:20px"></div>
<div class="grid_3 alpha"> </div><div class="grid_2"> </div><div class="grid_11"> </div>
<div class="clear" style="height:20px"></div>
</div>
</body>
</html>