css - 如何改变CF7的宽度?

标签 css wordpress contact-form-7

我无法将表单域的宽度更改为 100%。我认为这是因为主题代码已损坏...

这是我的代码:

.wpcf7-text, .wpcf7-textarea, .wpcf7-captchar, .wpcf7-form-control-wrap {
background-color:rgba(255, 255, 255) !important;
border: none !important;
width: 100% !important;
border-radius: 0 !important;
font-size: 16px;
font-weight: 500;
color: #1c1c1c !important;
padding: 16px !important;
box-sizing: border-box;
}
.wpcf7-submit {
color: #fff;
background-color: #414141 !important;
margin: 8px auto 0;
font-family: Francois One, latin;
font-size: 30px;
font-weight: 500;
border-color: #414141 !important;
border-bottom: 3px solid rgb(163, 163, 163)!important;
border-left: #414141 !important;
border-right: #414141 !important;
border-radius: 8px;
padding: 6px 60px;
line-height: 1.7em;
box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.4);
}
.wpcf7-submit:hover { 
background-color:rgba(78, 78, 78) !important; 
border-width: 2px !important;
border-color:  #494949 !important;
border-bottom: 3px solid rgb(163, 163, 163)!important;
border-left: #4e4e4e !important;
border-right: #4e4e4e !important;
border-radius: 8px;
padding: 6px 0px !important;

}
span.wpcf7-list-item { display: block; }

这是网站的链接:

https://ptbydimitri.de/so-geht-es-weiter/

如您所见,表单字段的宽度不像发送按钮那样为 100%。

希望有人能帮忙!

最佳答案

您的 input 标签位于 label 标签内,您必须将标签的宽度更改为 100% 才能使其正常工作。

.wpcf7 .wpcf7-form label {
    width: 100%;
}

关于css - 如何改变CF7的宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51918818/

相关文章:

css - NgClass 与类

html - 如何 == 为 CSS Helper 中的模型方法类?

css - Wordpress 子菜单在悬停时消失

javascript - 如何将 php 参数从一个函数发送到另一个函数(function.php)?

contact-form-7 - 如何在 Contact Form 7 的输入类型上添加 ID 和 Class 属性

html - 如何使背景图像停留在底部并覆盖整个高度

javascript - 刷新页面后Dojo Div Toggle View

javascript - Ajax表单提交后刷新

css - 如何修复 firefox 和 chrome 中的空间?

javascript - 有什么方法可以设置 <select> 下拉选项容器和元素的样式吗?