How do I make the image and link below align vertically to the center?
The image and the online link, and this line, aligned vertically to the middle (middle) in relation to the div
I tried 2 ways:
1)
.login {
display: block;
width: 100%;
height:50px;
border:#E9E9E9 3px solid;
position:relative;
}
.login img, .login a {
display:inline-block;
vertical-align:middle;
}
</style>
<div class="login">
<img src="_img/_iconesLoja/email.png" /> <a href="minhaConta.php">Minha Conta</a>
</div>
2)
<style>
.login {
display: block;
width: 100%;
height:50px;
border:#E9E9E9 3px solid;
position:relative;
}
.login .lg {
display: block;
vertical-align:middle;
height:30px;
}
.login .lg img, .login .lg a {
display:inline-block;
vertical-align:middle;
}
</style>
<div class="login">
<div class="lg">
<img src="_img/_iconesLoja/email.png" /> <a href="minhaConta.php">Minha Conta</a>
</div>
</div>
Has not one of the 2 worked out?