I would like to leave a div
completely aligned with a form straight horizontally. However, although they are side by side, the form is "descending" when it should be aligned horizontally. How can I solve this problem? Currently it looks like this:
#contato{
background-color:#ABB7B7;
margin-top:5%;
width:100%;
display: inline-block;
}
#frm{
margin-left:35%;
}
#frm input[type="text"]{
height:30px;
width:60%;
border:none;
}
#frm textarea{
width:60%;
border:none;
}
#frm input[type="submit"]{
border:none;
width:15%;
height:30px;
color:white;
background-color:black;
margin-left:45%;
}
#cont-ap{
width:30%;
}
<div id="contato">
<div id="cont-ap">
<h3>Por favor, mande nos uma mensagem, fale conosco e tire todas as suas dúvidas.</h3>
</div>
<form action="#" method="POST" id="frm">
<h3 id="msg"></h3>
<input type="text" name="mailTxt" id="mailTxt" placeholder="Seu endereço de email aqui" onblur="validaEmail(this);" />
<br /><br />
<input type="text" name="assntTxt" id="assntTxt" placeholder="O assunto do seu email" onblur="validaAssunto(this);" />
<br /><br />
<textarea id="msgMail" placeholder="A sua mensagem" onblur="validaMsg(this);"></textarea>
<br /><br />
<input type="submit" value="Enviar" name="btnMail" id="btnMail" />
</form>
</div>
And here's the JSFiddle .