我正在尝试将reCAPTCHA小部件与我的输入字段对齐,但样式.g-recaptcha似乎没有实现太多.有谁知道我可以使用的任何选择器?
表单HTML:
PHP">
required data-errormessage-value-missing="Please enter your email address." />required data-errormessage-value-missing="Please enter your message.">
CSS:
.contact-form {
margin: 0 auto;
position: relative;
top: 50%;
transform: translateY(-50%);
max-width: 600px;
font-family: 'LinotypeUniversW01-Thin_723604',Arial,sans-serif;
font-size: 20px;
}
.contact-form label {
display: block;
margin: 0px 0px 15px 0px;
}
.contact-form label > span {
width: 100px;
text-align: right;
float: left;
padding-top: 8px;
padding-right: 20px;
}
.contact-form input,.contact-form textarea {
margin-bottom: 15px;
padding: 10px;
border: none;
}
.contact-form input.input-field {
width: 70%;
height: 20px;
font-size: 18px;
}
.contact-form .textarea-field {
width: 70%;
height: 250px;
font-size: 18px;
}
textarea {
resize: none;
}
textarea:focus,input:focus {
outline: 0;
}
#recaptcha {
width: 304px;
margin: 0;
}
.g-recaptcha {
text-align: left;
}
input.submit-button {
background-image: url("../img/submit-button.jpg");
width: 225px;
height: 60px;
border: none;
}
网页网址:http://api.marioparra.me#contact.
任何帮助将非常感激!
最佳答案
只需修改现有的CSS:
.contact-form label,#recaptcha {
display: block;
margin: 0px 0px 15px 0px;
}
.contact-form label > span,#recaptcha::before {
width: 100px;
text-align: right;
float: left;
padding-top: 8px;
padding-right: 20px;
content:""; //Make sure you add this as well
}
.contact-form .textarea-field,.g-recaptcha {
width: 70%;
height: 250px;
font-size: 18px;
display: inline-block;
}
原文链接:https://www.f2er.com/css/427541.html