Space between Ivs

Asked

Viewed 5,096 times

2

Good Morning!

I have the figure below where between the figure "HOME GAS" and the Div which contains some red buttons, we see a space. inserir a descrição da imagem aqui The problem is that space does not exist in the code.

body {
    width: 100%;
    font-size: 14px;
}
div.banner {
 width: 100%;
 position: relative;
}
div.sessoes {
    width: 1000px;
    position: relative;
    margin: auto;
}
div.banner {
    background-color: #EEE;
}
div.banner img{
    width:100%;
}

index php.

<div class="banner">
   <div class="sessoes"><?php require_once "_requeridos/banner.php"; ?></div>
</div>

banner php.

<img src="_img/_banner/banner2.png"/>

Can be seen in: http://www.gasmuriae.com.br/

How to remove this?

1 answer

2


Just in the css file put display: block in the img tag of the banner class:

div.banner img {
    width: 100%;
    display: block;
}
  • Okay. But then a question arose: Looking at the inspector, the img is 300px high, the div.sessoes with 308px of stock and the div.banner with 308px of height due to the height of the div.sessoes. That is, if you change the height of the div.sessoes to 300px manually, then the div.banner automatically adjusts to 300px, which leads me to believe that the problem, whatever it is, is in the div sessoes and not in the img. Not?

  • In the inspector, in the tab that shows the measurements of the image, it shows no measure other than width and hieght. No border, margin or other measure. All 0.

  • This answer solved but I would like to know why it solved the situations described in the previous comment!

Browser other questions tagged

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