Place floating footer over another div

0

I have the following html structure:

<body>
    <div id="gmap"></div>
    <footer>
    //conteudo do footer
    </footer>
</body>

I want to put the div gmaps occupying the entire screen and the footer floating on it, it is currently like this:

Current CSS is:

#gmap{
    z-index: 1;
    width:100%;
    height:80vh;
}
footer{
    z-index: 2;
}
    
asked by anonymous 14.03.2018 / 19:05

1 answer

2

If you want footer to be above div with id #gmaps , I recommend using these css in footer

footer{
width:100%;
position: fixed;
bottom: 0;
}

With this code, you can put footer over

    
14.03.2018 / 19:14