I'm trying to create a menu made with images with the hover effect, but I do not understand why you do not see the div
complete.
The menu consists of 6 images (which in reality are twelve, two per menu option, for the hover) and must be seen in two 'lines'. However, I do not know why they overlap in a single 'line' and they end up seeing only three.
I leave the simplified code in case someone who understands sees where the fault is:
html, body {
height: 100%;
}
.image-grid {
display: -moz-flex;
display: -webkit-flex;
display: -ms-flex;
display: flex;
-moz-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.image-grid .image {
width: 33%;
padding-left: 6px;
}
.image-grid .image img {
width: 100%;
}
#cf {
position: relative;
width: 33%;
display: -moz-flex;
display: -webkit-flex;
display: -ms-flex;
display: flex;
-moz-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
#cf img {
position: absolute;
-webkit-transition: opacity 1s ease-in-out;
-moz-transition: opacity 1s ease-in-out;
-o-transition: opacity 1s ease-in-out;
transition: opacity 1s ease-in-out;
}
#cf img.top:hover {
opacity: 0;
height: 350px;
}
<section class="image-grid">
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/people" />
</a>
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/nature" alt="" />
</a>
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/city" alt="" />
</a>
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/sports" alt="" />
</a>
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/cats" alt="" />
</a>
<a id="cf" href="#" class="image">
<img class="bottom" src="http://lorempixel.com/200/200/nature" alt="weddings" title="weddings" />
<img class="top" src="http://lorempixel.com/200/200/abstract" alt="" />
</a>
</section>