html - 即使有边框,子 div 的宽度也比父 div 大

标签 html css

你好,我有一个父 div 和一个子 div

div 在全尺寸屏幕上有 1300px 宽度。 但是如果我在子 div 上使用 width:100%,它需要 1600px 宽度

我使用了 box-sizing:border-box; 属性,但问题仍然存在。 我应该怎么做才能解决这个问题?

我做了一个快速 fiddle

Image of the Site

最佳答案

添加这个:

.inner-content{ position: relative }

关于html - 即使有边框,子 div 的宽度也比父 div 大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34394186/

相关文章:

javascript - 如何使用 JavaScript 获取移动可排序 UIKit 3 元素的 "id"?

javascript - Google 财经的股票报价问题

html - 如何使用 bootstrap 4 垂直对齐按钮内容

css - 维护打印 CSS 样式表文件

javascript - 经典 Asp - JavaScript : Height and width is always zero in chrome

html - 如何阻止 header 中的 css 格式化 html 中的其他对象

javascript - 改变背景颜色

javascript - 使用一个 css/js 文件

html - 通过 URL 插入时,SVG 图标显示损坏的图像

javascript - 根据表单字段值修改 CSS (Pardot)