如何使用960网格系统居中网格

时间:2014-06-08 13:04:31

标签: html css centering 960.gs

我试图将grid_5集中到container_12但没有任何成功。你知道如何居中grid_5吗?我正在使用网格系统960

<article class="container_12">
        <section id="signupform" class="grid_5">
            <form action="">
                <div>
                    <label>Username*</label>
                    <input type="text" name="username" autofocus>
                </div>
                <div>
                    <label>Password*</label>
                    <input type="password" name="password">
                </div>
                <div
                    <label>Conferma Password*</label>
                    <input type="password" name="confirm_password">
                </div>
                <div>
                    <label>E-mail*</label>
                    <input type="email" name="email">
                </div>
            </form>
        </section>
    </article>

1 个答案:

答案 0 :(得分:1)

使用此css:

.container_12 .grid_5 { width: 380px; float: none; display: block; margin: 0 auto; }

演示:http://jsfiddle.net/AYmFL/2/