html - CSS - 响应问题

标签 html css

我会尽量简化这个过程。您可以在 http://www.insidemarketblog.com 查看问题(你可以看到调整大小的问题)

当您调整页面大小时使侧边栏元素移到底部(侧边栏一移到底部),您会注意到带有蓝色标题“发展您的业务”的电子邮件表单 float 到右侧,不会调整到 100%。如何将其固定为向左浮动并调整为 100%?

代码如下:

HTML:

<div id="text-2" class="widget widget_text" style="">
<p class="widget_title">Grow Your Business</p>
<div class="textwidget">
<div id="wpcf7-f94-o1" class="wpcf7">
<form class="wpcf7-form" novalidate="novalidate" method="post" action="/#wpcf7-f94-o1">
</div>
</div>
</div>

这是我放置所有相关 CSS 代码的最佳尝试(但这可能不完整,因为它是响应式 CSS。

.columns > .sidebar > *:nth-child(2n+2) {
  clear: none;
  float: right;
}
.columns > .sidebar > * {
  width: 240px;
}
.columns > .sidebar > * {
  clear: both;
  float: left;
  width: 46.15%;
}

这是它的外观截图(以及明显错误的原因)。

enter image description here

最佳答案

将此添加到您的代码中:

@media (max-width: 984px){
    .columns > .sidebar > * {
        clear: both;
        float: left;
        width: 100%;
    }
}

关于html - CSS - 响应问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22734641/

相关文章:

javascript - 如果源发生更改,则仅在加载时才显示新图像

html - Safari CSS 字体颜色问题

html - 为什么我的所有列都在一列中?

css - Twitter bootstrap 和 css : How to remove the modal overlay and refocus on the input box, 以便用户可以在模式打开时输入

html - 有人可以解释一下 css 中称为 dots-per-CSS-inch 而不是 dots-per-physical-inch 的错误吗

html - 输入选项(单选框和复选框)有带图标的按钮

javascript - 当内容出现在底部时使页脚向上移动

html - 使用CSS更改首字母大写和其他小写

html - 我的模板的包装器漂浮在我的页脚上

javascript - 根据屏幕尺寸更改 html 元素的顺序