I have a div
that contains another div
inside, but this second div
(inside) contains a <img src="">
, how can I do to leave this div
with the image aligned in the center of the first div
? I already tried vertical-align
, horizontal-align
and etc and nothing is right.
#clientes-logo1
{
width: 250px;
height: 200px;
background-color: white;
margin: 5px 5px 5px 0;
display:inline-block;
}
#logotipo-clientes
{
width: 220px;
height: auto;
/* vertical-align: middle; -- não funciona */
/* horizontal-align: middle; -- não funciona */
margin: 50px 5px 0px 15px; /* se usar assim a div principal desalinha */
}
<div id="clientes">
<h1>Clientes</h1>
<div id="clientes-logo1">
<img id="logotipo-clientes" src="http://blog.grio.com/wp-content/uploads/2012/09/stackoverflow.png"title="" alt="">
</div>
</div>