I want to put my button at the bottom of a div or the bottom of the screen (but in a non-fixed position). My code structure is as follows:
I want to put a button at the bottom of div 1, the height of which is set using jQuery (height is the height of the screen, so setting a button at the bottom of the screen can also be a solution)
What I have tried so far:
CSS
.button {
position: fixed;
bottom: 10px;
left: 50%;
margin-left: -104.5px;
}
This centers the button (what I want) and it places it at the bottom of the screen, but the position is fixed, so if I scroll down, the button also goes down. I also tried setting the button positionto absoluteand div-1 positionto relative, this didn't work either.
: div , .
user6038967