I'm struggling to find the right CSS positioning for a button on my page. I want the button to stay fixed in a specific location, but when there's a lot of content on the page, I need it to adjust its position accordingly.
Initially, I want the button to be at the bottom of the page when there isn't much content, as shown in the code snippet below:
#Button
{
position: fixed;
height:90px;
width:220px;
left:16%;
top:70%;
border:none;
background:none;
}
Then, when there's a significant amount of content, I'd like the button to move down using the following code:
#Button
{
position: absolute;
height:90px;
width:220px;
left:16%;
padding-top:10%;
padding-bottom: 13%;
border:none;
background:none;
}
Can anyone lend a hand with this? I've tried looking online for solutions but haven't been able to make sense of it.