2016-06-21 9 views
0

my websiteに若干の問題があります。私はWordpressのインストールでContact Form 7を使用しています。相当量のCSSをカスタマイズしています。ウェブ上では問題ありませんが、モバイルではメールのフィールドが小さすぎます。送信ボタンが電子メールフィールドと同じ幅にならないようにする必要があります。CSSフォームのカスタマイズ - Wordpressの2列

emailFieldがコンテナの約70%と送信ボタン30%を埋め込むように、このCSSで魔法を働かせる人は誰ですか?事前のおかげで...

::-webkit-input-placeholder { /* WebKit browsers */ 
    text-align: center; 
    text-transform: uppercase; 
    font-family: "Poppins", sans-serif; 
    font-size: 12px; 
    font-weight: 600; 
    opacity: 0.8; 
    color: #a21cea !important; 
    } 

:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 
    text-align: center; 
    text-transform: uppercase; 
    font-family: "Poppins", sans-serif; 
    font-size: 12px; 
    font-weight: 600; 
    opacity: 0.8; 
    color: #a21cea !important; 
} 
::-moz-placeholder { /* Mozilla Firefox 19+ */ 
    text-align: center; 
    text-transform: uppercase; 
    font-family: "Poppins", sans-serif; 
    font-size: 12px; 
    font-weight: 600; 
    color: #a21cea !important; 
} 
:-ms-input-placeholder { /* Internet Explorer 10+ */ 
    text-align: center; 
    text-transform: uppercase; 
    font-family: "Poppins", sans-serif; 
    font-size: 12px; 
    font-weight: 600; 
    opacity: 0.8; 
    color: #a21cea !important; 
} 
.wpcf7-inline-wrapper .wpcf7-inline-field input:not([type="submit"]), .wpcf7-inline-wrapper .wpcf7-inline-field input::-webkit-input-placeholder { 
color: #a21cea !important; 
} 
.wpcf7-inline-wrapper .wpcf7-inline-field input:not([type="submit"]), .wpcf7-inline-wrapper .wpcf7-inline-field input::-moz-placeholder { 
color: #a21cea !important; 
} 
.wpcf7-inline-wrapper .wpcf7-inline-field input:not([type="submit"]), .wpcf7-inline-wrapper .wpcf7-inline-field input:-ms-input-placeholder { 
color: #a21cea !important; 
} 

.wpcf7-text, .wpcf7-form textarea { 
    -moz-border-radius: 30px; 
    -webkit-border-radius: 30px; 
    margin-left: 0px; 
    border-width: 0px; 
    border-radius: 30px 30px 30px 30px; 
    width: 100%; 
    text-align: center; 
    text-transform: uppercase; 
    font-family: "Poppins", sans-serif; 
    font-weight: 600; 
    font-size: 12px; 
    height: 45px; 
    color: #a21cea !important; 
    background-color: #fff !important; 
    opacity: 0.9; 
} 



.wpcf7 input[type="submit"] { 
    height: 45px; 
    -moz-border-radius: 30px; 
    -webkit-border-radius: 30px; 
    border-radius: 30px 30px 30px 30px; 
    border-color: #fff !important; 
    border-color: #fff !important; 
    color: #fff !important; 
    background:none !important; 
} 

.wpcf7 input[type="submit"]:hover{ 
    height: 45px; 
    -moz-border-radius: 30px; 
    -webkit-border-radius: 30px; 
    border-radius: 30px 30px 30px 30px; 
    color: #a21cea !important; 
    border-color: #fff !important; 
    background-color: #fff !important; 
    background: white !important; 
} 


.wpcf7 input[type="submit"]:focus{ 
    height: 45px !important; 
    -moz-border-radius: 30px !important; 
    -webkit-border-radius: 30px !important; 
    border-radius: 30px 30px 30px 30px !important; 
    color: #fff !important; 
    border-color: #fff !important; 
} 

.home .btn-accent:not(.btn-focus-nobg):not(.btn-text-skin):focus { 
    color: #ffffff !important; 
} 
.home .btn-accent:not(.btn-hover-nobg):not(.btn-text-skin):hover { 
    color: #a21cea !important; 
} 
.wpcf7-not-valid-tip 
{ 
    font-family: "Poppins", sans-serif; 
    font-weight: 600; 
    font-size: 14px; 
    color: #fff !important; 
} 
.wpcf7-response-output 
{ 
    font-family: "Poppins", sans-serif; 
    font-weight: 600; 
    font-size: 14px; 
    color: #fff !important; 
} 
.wpcf7 .wpcf7-response-output 
{ 
    font-family: "Poppins", sans-serif; 
    font-weight: 400; 
    font-size: 14px; 
    color: white !important; 
} 

.wpcf7-mail-sent-ok 
{ 
    font-family: "Poppins", sans-serif; 
    font-weight: 600; 
    font-size: 14px; 
    color: #fff !important; 
} 

答えて

1
@media (max-width:580px) { 

.wpcf7-inline-wrapper.wpcf7-newsletter p:nth-child(2) { 
    width: 100%; 
    margin:10px!important; 
} 

} 

このコードの以下の部分はEMAILフィールドを作り、互いに下のボタンをSUBMITします。

+0

私が探していたものではありませんが、それはうまく機能しており、ユーザーが自分のメール全体を見るのが簡単です。しかしそれはそれが少し同期して見える原因になります。それに対応するために、その最大幅ブロックの検証テキストを中央に置くことができますか? –

+0

はい、あなたはそれを行うことができます。もし私のコードがあなたを助けたら、それを完全なものとしてマークできますか? –

関連する問題