[EDIT]
Since most of the answers are just things that I already tried and don't work and since I saw in the comments some ppl arguing over using or not java script I'll consider js answers too. Also someone was arguing about someones answer not beeing compatible withe some versions of IE. Honestly I don't care about IE because it's not a supported browser anymore, microsoft has edge now and if you still use an antique browser that it's not up to dat I don't really care It is not a huge project and if IE users have compatibility problems, that's life.
- SHORT: Give me anything that works and also don't worry about compatibility as long as it works on most browsers in the last updates.
[/EDIT]
How can I keep a footer to the bottom of the page without this happening:
My code looks like this:
<body>
<div id="wrapper">
<center>
<div id="navbar">
<div><a class="current">HOME</a></div>
<div><a>NEWS</a></div>
<div><a>CONTACT</a></div>
</div>
</center>
<div id="content">
<center>
<div class="card">
This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text. This is some random text.
</div>
</center>
</div>
<div id="footer">
</div>
</div>
</body>
And the css:
body {
margin: 0 auto;
}
#navbar {
z-index: 100;
padding: 0;
margin: 0;
position: fixed;
height: 47px;
width: 100%;
top: 0;
left: 0;
right: 0;
}
#navbar > div {
display: inline-flex;
margin-left: -4;
}
#navbar > div a {
text-align: center;
text-decoration: none;
padding: 14px 16px;
}
#content {
margin-top: 60;
margin-bottom: 15px;
}
#footer {
width: 100%;
height: 100px;
position: absolute;
right: 0;
bottom: 0;
left: 0;
}
I got rid of the visual css (bg and effects)