CSS conflict on index

Asked

Viewed 103 times

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:

inserir a descrição da imagem aqui

whereas the correct would be as below:

inserir a descrição da imagem aqui

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.

  • Removing the <div class="sessoes"> the problem is solved.

  • 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()?

  • boot one display: block; width: 100%; in this div sessoes.

  • I can’t, she’ll give me 1000px I need. I can’t touch it!

  • can’t put then display: block; width: 1000px;?

  • 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 {}

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.