1
I have the page below with a css
:
http://hotplateprensas.com.br/gasmuriae.com.br2/
In it has a div
with the classe
top and inside div
have 3 div's
:
<div class="topo">
<div class="topoTel" id="topoTel"><img src="_img/sgb.png" /></div>
<div class="topoMeio" id="topoMeio"><h1><?php echo $constantes->getWwwSite(); ?></h1></div>
<div class="topoRedesSociais" id="topoRedesSociais">
<img class="face" src="_img/facebook.png" />
<img class="insta" src="_img/instagram.png" />
</div>
</div>
To save code that was like this,
div.topo div.topoTel,
div.topo div.topoMeio,
div.topo div.topoRedesSociais {
position:relative;
display:inline-block;
vertical-align:middle;
width: 33%;
}
did so:
div.topo div {
position:relative;
display:inline-block;
vertical-align:middle;
width: 33%;
}
But if you look at the web page, you’ll see that the layout from the top is messy.
Looks like he’s been changed from inline-block
for block
the display of div's
internal.
As can be seen below:
whereas the correct would be as below:
But I made a page,
http://hotplateprensas.com.br/gasmuriae.com.br2/topo.php
Only with the top part. And to my surprise, the error did not occur!
I am a long time looking for conflict and for my little experience with css, I am not finding and ask for your help.
I noticed that on the page where only the top does not have a div with the class "sessoes" that has in the full site.
– Sam
Removing the
<div class="sessoes">
the problem is solved.– Sam
got it. I made an adaptation and put div.topo div:not(div.sessoes) {}. And, he turned the Divs into diplay:block, one underneath the other. In fact, as the 3 div’s were inside the div.sessoes and the div sessoes was inside the div.topo, the style eventually turned it into 33% as well.But I can’t take the div.sessoes because it gives the body size. That there is a way to do div.topo div:not(div.sessoes) {} so that the children of div.sessoes are not affected by . not()?
– Carlos Rocha
boot one
display: block; width: 100%;
in this div sessoes.– Sam
I can’t, she’ll give me 1000px I need. I can’t touch it!
– Carlos Rocha
can’t put then
display: block; width: 1000px;
?– Sam
No, or there will be 3 lines. Tiredness does things. I found the solution that was right in front of me: div.topo div.sessoes div {}
– Carlos Rocha