首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何改变CF7的宽度?

如何改变CF7的宽度?
EN

Stack Overflow用户
提问于 2018-08-19 22:45:34
回答 1查看 127关注 0票数 0

我在将表单字段的宽度更改为100%时遇到问题。我认为这是因为它与主题代码一起损坏了…

下面是我的代码:

代码语言:javascript
复制
.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/

正如您所看到的,表单域的宽度并不像send按钮那样是100%。

我希望有人能帮助我!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-20 02:57:05

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

代码语言:javascript
复制
.wpcf7 .wpcf7-form label {
    width: 100%;
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51918818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档