I have designed a form and I have the first name and last name fields displayed next to each other horizontally as shown in the image. When a user clicks on a field that field will change colour (yet to be coded).
Currently as shown in the image there is a gap between the First Name field and the Last name field. I can't figure out where this gap is coming from.
How can I remove this gap so that the field takes up all of the space?
The HTML:
<div class="topBox">
<div class="closeModal">X</div>
<div class="clear"></div>
<div><img src="images/ProvenWordLogoSmall.png" alt="ProvenWord Logo"></div>
</div>
<div class="bottomBox">
<h3>Free Quote Form</h3>
<form class="freeQuoteForm">
<div class="nameFields">
<input type="text" id="firstName" placeholder="First Name" required>
<input type="text" id="lastName" placeholder="Last Name" required>
</div>
<div class="nameFields">
<input type="email" id="email" placeholder="Email Address" required>
</div>
</form>
</div>
<script type="text/javascript" src="main.js"></script>
</body>
The CSS:
.topBox {
width: 640px;
margin: 0 auto;
}
.bottomBox {
background: white;
margin: 30px auto;
width: 640px;
height: 595px;
border: 1px solid #9c9c9c;;
}
.bottomBox h3 {
text-align: center;
padding: 20px 0;
}
.freeQuoteForm {
width: 530px;
height: 430px;
border: 1px solid #9c9c9c;
text-align: left;
}
input, textarea {
font-family: "Sinkin Sans", Verdana, Helvetica, sans-serif;
font-size: 12px;
font-weight: 100;
border: none;
}
input[type="text"], input[type="email"] {
display: inline-block;
width: 262px;
height: 60px;
padding: 0px;
}
input[type="email"] {
width: 518px;
}
#lastName {
border-left: 1px solid #9c9c9c;
}
.nameFields {
border-bottom: 1px solid #9c9c9c;
}