Avatar of Jazzy 1012
Jazzy 1012
 asked on

Make footer stick to bottom

This is my footer now, How can I make it go all the way down?? I tried everything!
see.png
Css:
.pageContent{
margin:auto;
height:100%;
min-height:100vh;
width: 100%;
background-color: #fafafa;
flex: 1;
position: relative;
} //the whole div of my page
#footer{
display:flex;
justify-content: space-between;
height: 45px;
bottom: 0px;
width: 100%;
background: rgba(24,24,29,0.7);
color:white;
z-index:3;
font-size: 0.76em;
position:absolute;
}//my footer div

Open in new window

Code:
<div class="pageContent">
<div id= "footer" style="position:absolute;">
<span id="copyright" class= "centered uppercase"> Epicured &#169;2016</span>
<span class= "flex">
<a class= "pageLink inlineBlock uppercase" href="contact.php">
<span class="text"> Contact </span>
</a>
<a class= "pageLink inlineBlock uppercase" href="legal.php">
<span class="text"> Legal</span>
</a>

<a class= "pageLink inlineBlock uppercase" href="privacy.php">
<span class="text"> Privacy</span>
</a>
</span>
</div>


</div>

Open in new window

CSS

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon
Dmitrii

Have you tried to set:
position: relative;

Open in new window

in #footer?
Jazzy 1012

ASKER
yes I tried all different positions, nothing seemed to work
Jazzy 1012

ASKER
It only works when i do bottom: -200px or more, which is not a logically thing to do
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Julian Hansen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Snarf0001

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Julian Hansen

Just check browser backward compatibility before using flex - if you need to support older browsers you might run into trouble

https://developer.mozilla.org/en/docs/Web/CSS/flex
https://www.w3schools.com/cssref/css3_pr_flex.asp