tags:

views:

32

answers:

1

Hi

How do i repeat this, somehow the clear doesn't make the layout under eachother ??

<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>
+2  A: 

Try putting a &nbsp; within the empty grid divs. There are some cross-browser issues with using empty 960.gs grid divs.

Edit: The following works perfectly in Firefox and Chrome. Perhaps your doctype or the container elements are not right?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>960 Grid System &mdash; 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">&nbsp;</div><div class="grid_2">&nbsp;</div><div class="grid_11">&nbsp;</div>
      <div class="clear" style="height:20px"></div>
      <div class="grid_3 alpha">&nbsp;</div><div class="grid_2">&nbsp;</div><div class="grid_11">&nbsp;</div>
      <div class="clear" style="height:20px"></div>
      <div class="grid_3 alpha">&nbsp;</div><div class="grid_2">&nbsp;</div><div class="grid_11">&nbsp;</div>
      <div class="clear" style="height:20px"></div>
      <div class="grid_3 alpha">&nbsp;</div><div class="grid_2">&nbsp;</div><div class="grid_11">&nbsp;</div>
      <div class="clear" style="height:20px"></div>
    </div>
  </body>
</html>
anshul
hmm, didn't do the trick. somehow the "row" gets into the grid_11 div
alex
Umm... Did the edit help?
anshul