When I use the following css on a div:
position: absolute;
bottom: 70px;
left: 0;
right: 0;
margin: auto;
my idea is to place the div in the middle (vertically) and 70px from the bottom of the page. This works when the whole page is visible on the viewport, however when the page is scrollable the div is positioned 70px from the bottom of the viewport, and not 70px from the bottom of the page. How do I solve this issue?
Edit:
Here is the relevant HTML:
<body>
...
<div class="bottomNav">
<img src="images/instacircle.png" alt="instagram-icon" id="insta-icon" />
<img src="images/mailcircle.png" alt="mail-icon" id="mail-icon" />
</div>
</body>
The css for the bottomNav is:
.bottomNav {
display: flex;
align-items: center;
justify-content: space-evenly;
width: max(10vw, 100px);
height: 6vh;
position: absolute;
bottom:70px;
left: 0;
right: 0;
margin: auto;
background-color: rgba(184, 184, 184, 0.425);
border: solid 3px rgba(75, 75, 75, 0.253);
border-radius: 3px;
text-align: center;
color: white;
}
And the css for the body (parent) is:
body {
background-color: rgb(46, 46, 46);
color: rgba(219, 219, 219, 0.863);
}