【问题标题】:Height of input box on Contact 7 formContact 7 表单上输入框的高度
【发布时间】:2015-08-23 05:24:25
【问题描述】:

我正在尝试降低此页面上 Contact 7 表单中“您的消息”输入框的高度:https://www.nycofficesuites.com/new/office-space-vertical/

我尝试了以下方法(高度不同,所以我可以看到哪个在工作)但没有任何工作。谢谢你的帮助。

.wpcf7-textarea {
height: 80px;
}

.wpcf7 input[type=text] {
height:10px !important;

}

textarea {
   height: 30px;
}

【问题讨论】:

  • 如果您检查该元素,您会看到它设置了min-height。所以不要使用.wpcf7-textarea{ height: 80px; },而是使用.wpcf7-textarea{ min-height: 80px; }

标签: css wordpress plugins contact-form


【解决方案1】:

尝试降低这个类的最小高度

.form-box textarea, .wpcf7 .wpcf7-textarea {
    border: medium none;
    display: block;
    min-height: 97px; //REDUCE THIS
    padding: 12px 10px;
    width: 96.6%;
}

【讨论】:

    【解决方案2】:

    您的min-height 推翻了您的身高定义。除了高度之外,您还需要缩小最小高度:

    min-height: 30px;
    height: 30px;
    

    【讨论】:

      【解决方案3】:

      删除您的.form-box textarea, .wpcf7 .wpcf7-textarea 上的min-height,这会阻止您的css height 应用于textarea

      【讨论】:

        猜你喜欢
        • 2019-09-17
        • 2023-03-21
        • 1970-01-01
        • 2018-04-06
        • 2023-03-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-06-16
        相关资源
        最近更新 更多