960 GridSystem, three grid_4 inside one grid_12

2019-05-21 04:10发布

问题:

I've created a 16 column layout with 960gs with a div class="grid_12" (main) and after that grid_4 (right) (12+4...) Inside that grid_12 I wanted a three column style (3 pcs. grid_4). But the grid_4 boxes don't fit inside the grid_12, the last box drop into a second row.

Shouldn't the 960gs framework be able to do this layout for me, have i missed anything?

Thanks in advance.

<div class="container_16">
...
<div id="main" class="grid_12">
 <div class="grid_12">
   <div class="grid_4"></div>
   <div class="grid_4"></div>
   <div class="grid_4"></div>
 </div>

 <div id="right" class="grid_4">

 </div>
</div>
...
</div>

回答1:

Found out that I needed to add alpha and omega classed to the first and last grid_4 box. Now it works.

<div id="main" class="grid_12">
    <div class="grid_4 alpha">

    </div>
    <div class="grid_4">

    </div>
    <div class="grid_4 omega">

    </div>
</div>