On my website, I have implemented a countdown timer and a responsive wallpaper. My goal now is to center the div at the bottom of the page and make sure it always stays there. I've tried some code snippets from StackOverflow, but they either gave me a scroll bar or left some space at the bottom. Here are the codes I've used:
div {
position: absolute;
height: 100px;
top: 100%;
margin-top:-100px;
}
The first code snippet resulted in a scroll bar, while the second one left a gap at the bottom.
This is the CSS for the responsive image on the index page:
<style>
body {
background-attachment: fixed;
background-image: url(bg.png);
background-position: top center;
background-repeat: no-repeat;
margin:0;
padding: 0;
background-size: cover;
-moz-background-size: cover;
-webkit-background-size: cover;
}
</style>
Additionally, here is the style.css file with some styling:
body, p, span, div {
font-family: 'Droid Sans', arial, serif;
font-size: 12px;
line-height: 18px;
color: #6d6d6d;
}
.countdown {
padding-top: 15px;
width: 100%;
margin: auto;
}
.countdown .countdown_section {
background: url('images/backcountdown.png') no-repeat 1px top;
float: left;
width: 54px;
height: 145px;
margin: 0 5px;
text-align: center;
line-height: 6px;
}
.countdown .countdown_amount {
font-size: 15px;
color: #ab7100;
text-shadow: 0 0.8px #fedd98;
line-height: 52px;
font-weight: bold;
text-align: left;
}
.countdown span {
font-size: 8px;
color: #999999;
text-transform: uppercase;
line-height: 26px;
}
There's only one div class on the index page named "countdown clearfix," and as someone new to HTML/CSS, I'd appreciate any guidance on how to achieve my desired layout.