Is there a way to horizontally center a wrapper without using position absolute?
#wrapper {
width: 721px;
height: 720px;
position: absolute;
margin: auto;
top: 136px;
left: 0;
right: 0;
background: white;
clear: both;
}
The wrapper contains three floated divs, which get messed up when the position is changed to relative.
____________________________________________
header
____________________________________________
__wrapper____________
| | |
| | |
| div1 | div2 |
| | |
| | |
| | |
|_________|__________|
| div3 |
|____________________|
__________________________________________
footer
__________________________________________
How can I create a sticky footer that always stays at the bottom of the site regardless of content amount?
.footer {
border-top: 1px solid #dcdcdc;
max-width: 100vw;
font-weight: bold;
text-align: center;
background: #f0f0f0;
width: 100%;
height: 80px;
}
In this JS-FIDDLE, you can see that the footer hides behind the header.