我正尝试在页面的顶部,底部,左侧和右侧创建一个带有20像素排水沟的页面。目前的设置为我的集装箱似乎并没有为20像素排水沟我想对我的容器带排水沟的容器
这里搭边的工作是我的HTML:
<body>
<div class="neo_wrapper"> <!-- Wrapper start -->
<div class="neo_container"> <!-- Container start -->
<div class="neo_header-fixed"></div>
<div class="neo_column_a"></div>
<div class="neo_column_b"></div>
<div class="neo_column_c"></div>
<div class="neo_footer-fixed"></div>
</div> <!-- Container end -->
</div> <!-- Wrapper end -->
</body>
我的CSS
*{
margin: 0;
padding: 0;
border: none;
}
/* Wrapper for entire page */
.neo_wrapper{
width: 100%;
height: 900px;
margin: 0 auto;
}
/* Container for content */
.neo_container{
width: 100%;
height: 100%;
margin: 120px -20px 50px 20px;
}
/* Fixed header */
.neo_header-fixed{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
background: #999;
z-index: 1000;
}
.neo_column_a{
width: 33.3333333333%;
height: 100%;
background: #063;
float: left;
}
.neo_column_b{
width: 33.3333333333%;
height: 100%;
background: #00F;
float: left;
}
.neo_column_c{
width: 33.3333333333%;
height: 100%;
background: #F00;
float: left;
}
/* Fixed footer */
.neo_footer-fixed{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
background: #999;
z-index: 1000;
}
而且的jsfiddle:http://jsfiddle.net/x0cfdm5r/
什么是阴沟里? – 2014-10-02 20:36:06
我想天沟是填充或保证金:) – 2014-10-02 20:38:12
考虑订购你的标记不同。将您的固定页眉和页脚放在包装纸的外面。这样,你可以在包装器中只有三个内容列,将边距(不是装订线)应用于包装器,并且瞧。 – TylerH 2014-10-02 20:42:12