html - DIV 未垂直覆盖整个内容

标签 html css wordpress

我正在使用的 Wordpress 主题提供了一个名为 Page Builder 的东西,可以使用它添加不同的元素并用东西填充它们,例如标题、内容框、图片库、视频等。现在,问题是,如果内容框(基本上应该包含页面上文本的主体)填充了普通文本,就可以了。但是当我为 WP 插件添加简码时,插件的输出很好,但是应该提供此内容背景的 div.blog-box 实际上并没有出现。

比较两个屏幕截图:第一个是纯文本,第二个包含插件短代码的输出。

Screenshot 1 Screenshot 2

.blog-box {
padding: 10px 20px;
background: #fff;
margin-bottom: 20px;
position: relative;
max-width: 1170px;
background: #333333;}

这些是应用于 div 的样式。谁能帮我找到这种行为的原因?

最佳答案

尝试使用overflow:hidden;

.blog-box {
padding: 10px 20px;
background: #fff;
margin-bottom: 20px;
position: relative;
max-width: 1170px;
background: #333333;
overflow:hidden;}

关于html - DIV 未垂直覆盖整个内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27731107/

相关文章:

jquery - 根据条件将 li 移动到 ul。

javascript - 使用本地文件为网络音频加载 mp3 作为 ArrayBuffer

javascript - 如何设置 Silverlight 浏览器应用程序和嵌入式 Web 浏览器控件之间的通信

html - Bootstrap 容器在 IE 中堆叠

css-only 100% div height with dynamic height footer

html - 如何始终在顶部和居中显示元素?

jQuery 事件处理程序不切换 CSS 类

javascript - Jquery 点击触发另一个 Div - 简单

wordpress - 您可以在 wp_query 中将tax_query 与多种帖子类型一起使用吗?

html - 我在 Wordpress 27 : doesn't display 中通过 CSS 添加了 "background-image"