css - 如何向骨架框架中的容器添加填充?

标签 css responsive-design skeleton-css-boilerplate

我正在使用骨架框架 (http://getsculpture.com),并且我想要一个具有背景颜色和白色容器页面的页面。

如果我添加 .container {padding:0 10px;} ,则在为小型设备调整窗口大小时布局会中断。希望我在这里遗漏了一些非常明显的东西。如何在不破坏响应式设计的情况下向容器添加填充?

最佳答案

找到了我的解决方案 here ,如果我正确理解你的帖子。

Since this has a white background, I want some padding inside the box. Simple enough: I added a inside the parent one and styled it appropriately with padding: 10px and a white background.

CSS

div.inner {
    padding: 4px 4px 8px 12px;
    overflow:auto;
}

HTML

<div id="what_you_think" class="realm eight columns alpha"> 
    <div class="inner">
        <h3>You are <font style="color:black;">not</font>...</h3>

    </div>
</div>

结果

http://home.grandecom.net/~scottmorse/

关于css - 如何向骨架框架中的容器添加填充?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13936670/

相关文章:

html - 在 HTML 代码上添加空间会改变布局

javascript - 根据表格的当前高度设置 div

html - 为什么 <form> 没有在 <nav> 中正确对齐?

html - Bootstrap 4 Carousel,背景为纯色,右侧为图像,左侧为文本

html - 骨架页面css子菜单ie7

html - CSS 为 Bootstrap 创建父类 (SiteBuilder Lite)

css - twitter bootstrap 自定义轮播指标

html - 图例不适合(不同的分辨率)

html - 基于 css 媒体查询重新调整 DIV 的显示顺序?

html - 如何用 CSS 显示网格线?