引导行中的间距和填充/边距

时间:2015-12-18 06:17:16

标签: css twitter-bootstrap margin padding

This is how I want the container to appear

我在理解填充,边距和装订线方面遇到了困难。

任何人都可以帮我设计出适合此设计的样式吗?我没有在列之间和周围留下任何空间。

我目前的编码是:

<div class = "container">
    <div class = "row">
        <div class = "col-md-12">
            <h3>Heading</h3>
        </div>
        <div class = "col-md-12">
            <div class = "row">
                <div class = "col-md-8" style = "border: solid 1px #003c70;">
                    Some text
                </div>
                <div class = "col-md-4" style = "border: solid 1px #003c70;">
                    Some text
                </div>
            </div>
        </div>
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

在你的colm中添加一个div

body{
  background: #ddd;
}
header{
  background: blue;
  padding: 5px 0px;
  color:#fff;
  padding-left: 15px;
}
.boder{
  border: 1px solid #333;
  min-height: 350px;
  padding:10px;
}
.wrapper{
  margin-top: 15px;
}
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>

<header>
  <h4>THIS  IS HEADER</h4>
</header>
<div class = "container">
    <div class = "row wrapper">
        <div class = "col-md-12">
            <div class = "row">
                <div class = "col-md-8">
                  <div class="boder">
                    blah blah..
                  </div>
                </div>
                <div class = "col-md-4">
                    <div class="boder">
                    blah blah..
                  </div>
                </div>
            </div>
        </div>
    </div>