4
I have the following code:
@charset "utf-8";
/* CSS Document */
img {
border: 0;
max-width: 100%;
}
div.cabecalho {
position:relative;
width:100%;
height:200px;
border:.1px solid #000000;
}
div.cabecalho div.logo,
div.cabecalho div.whats,
div.cabecalho div.contato,
div.cabecalho div.medias {
position:relative;
display:inline-block;
vertical-align:middle;
line-height:70%;
}
div.cabecalho div.logo {
width:43%;
}
<div class="cabecalho">
<div class="logo">
<img src="http://funerariasaopedro.net.br/novo/_img/logoFuneraria.png" alt="Logo"/>
</div>
<div class="whats"></div>
<div class="contato"></div>
<div class="medias"></div>
</div>
The goal is that the 4 divs
within the div
stay inline
and aligned vertically to the centre (Middle).
Where am I going wrong?
Goal:
Carlos is a little confused as to what you want. It would have like to put an image of the layout you need, or better explain what would be this alignment that you want.
– hugocsl
Yes. I have the head div. Ok? I have 4 daughter Ivs inside her (so Whats, contact and media). Ok? These 4 Ivs are inline display to queue rather than block. OK? So, only that the vertical alignment of the 4 Divs daughters, would like it to be centered in relation to the father div. Improved?
– Carlos Rocha
Possible duplicate of How best to center an element vertically and horizontally?
– Sam
The problem is in case I have 4 Divs to center and not just 1 equal to the examples given in the other post.
– Carlos Rocha