1
Created this portfolio it works perfectly in Chrome, but in firefox the tag button that is superimposed on the tag img (to make the shadow effect and open a modal) appears as a fifth item, generating horizontal scroll and not making the shading effect when the mouse passes over, I would like to know how to leave overlapped in firefox!
How it looks on Chrome:(How it should look) How it looks in firefox:
<style type="text/css">
.portfolio{margin-bottom: 100px; margin-top: 86px;display: flex; flex-wrap: wrap;}
.projetos{width: 25%;}
.projetos-content{position: relative;}
.projetos-img{width: 100%;}
.sombra{background: rgba(255,255,255,0.0); width: 100%; height: 100%; position: absolute; top: 0; transition: 0.5s; border: none;}
.sombra:hover{background: rgba(0, 0, 0, 0.4); cursor: pointer;}
</style>
<div class="portfolio">
<div class="projetos">
<div class="projetos-content">
<img src="1.jpg" class="projetos-img">
<button type="button" class="sombra" data-toggle="modal" data-target="#exampleModal"></button>
</div>
</div>
<div class="projetos">
<div class="projetos-content">
<img src="2.jpg" class="projetos-img">
<button type="button" class="sombra" data-toggle="modal" data-target="#exampleModal"></button>
</div>
</div>
<div class="projetos">
<div class="projetos-content">
<img src="3.jpg" class="projetos-img">
<button type="button" class="sombra" data-toggle="modal" data-target="#exampleModal"></button>
</div>
</div>
<div class="projetos">
<div class="projetos-content">
<img src="1.jpg" class="projetos-img">
<button type="button" class="sombra" data-toggle="modal" data-target="#exampleModal"></button>
</div>
</div>
</div>
Some CSS elements need prefixes to work in different browsers, I’m not sure if it’s the solution but it’s worth taking a look at this Tableless link that talks about Prefixes (https://tableless.com.br/prefixos-dos-browsers-a-web-precis-de-voce/) and this Mozilla Link that talks about Flexbox (https://developer.mozilla.org/en-US/docs/CSS/Usando_caixas_flexiveis_css). In addition, this site automatically applies some prefixes to the code you enter (https://autoprefixer.github.io/)
– Marcos de Andrade
thank you so much I will read and try to apply
– De Marchi