css - Bootstrap 行中的间距和填充/边距

标签 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>

最佳答案

borderpadding 添加额外的 div 样式,如下所示。

<div class = "col-md-8">
    <div class="some-class">
        Some text
    </div>
</div>

检查这个codepen

关于css - Bootstrap 行中的间距和填充/边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34349549/

相关文章:

javascript - 如何使输入框在 Ionic 中居中

angularjs - 使用 Angular 选择时的条件 ng-options

javascript - Bootstrap 模态框未正确填充

css - 1px 的未关联边距

ios - 在 UITableView 中实现边距的更好方法?

CSS更改单选按钮标签

html - 将所有导航栏菜单项放在 CSS 而不是 HTML 中

html - 使用媒体查询隐藏主菜单

javascript - jQuery getScript 函数添加搜索参数并抛出 404 错误

html - 段落标记的边距超出 Div