Hi, I’m working on a site and I’ve created a global block element with a temporary email signup and I’ve adapted Contact Form 7 so the button is on the same row as a field, but I can’t figure out how to then center it on the page! I hope you don’t mind taking a look for me, I’ll put the CSS for your reference below:
Here’s the CSS I’ve used on the form itself:
<div class="clearfix">
<div id="left">
[email* your-email "Enter your email"]
</div>
<div id="right">
[submit "Subscribe"]
</div>
</div>
I’ve then added in some CSS to the global block:
input.wpcf7-form-control.wpcf7-submit {
font-family: "Raleway",sans-serif;
font-weight: 700;
font-size: 1.4em !important;
text-shadow: none;
padding: 0.45em 0.85em 0.4em;
border: none;
color: rgb(61,61,61);
}
input.wpcf7-form-control.wpcf7-submit:hover {
text-shadow: none;
color: #fff;
background-color: #435a69;
}
.wpcf7 input[type="email"] {
font-size: 16px;
color: #000;
font-family: "Open Sans",sans-serif;
}
.wpcf7 select, .wpcf7 textarea, .wpcf7 input[type="text"], .wpcf7 input[type="password"], .wpcf7 input[type="datetime"], .wpcf7 input[type="datetime-local"], .wpcf7 input[type="date"], .wpcf7 input[type="month"], .wpcf7 input[type="time"], .wpcf7 input[type="week"], .wpcf7 input[type="number"], .wpcf7 input[type="email"], .wpcf7 input[type="url"], .wpcf7 input[type="search"], .wpcf7 input[type="tel"], .wpcf7 input[type="color"] {
border: solid 2px rgb(190,190,190);
}
#left {
width: 40%;
float: left;
margin-right:3%;
margin-left: 10%;
}
#right {
float: left;
}
.clearfix:after {
content:"\0020";
display:block;
height:0;
clear:both;
visibility:hidden;
overflow:hidden;
margin-bottom:10px;
}
.clearfix {
display:block;
}
form {
margin: 0;
}
I’ll put the URL of the page it’s on in a secure note as it’s on a temp link at the minute!
Thanks!
