I am in the process of creating an HTML5 page that has a centrally aligned wrap div and a sticky footer. Below is the HTML code I am using:
<body>
<div id="wrapper">
wrapper
</div>
<footer>
this is footer
</footer>
</body>
Here is the CSS code I have implemented:
#wrapper {
width:800px;
height:100%;
padding:5px;
margin:0 auto;
background-color:#fff;
border-radius:10px 10px 0 0;
box-shadow:0 1px 10px 3px #666;
}
footer {
background-color:#060318;
color:#3cc9e7;
width:800px;
padding:5px;
position:fixed;
bottom:0;
}
However, when I view the result, the elements are not centered as intended.
How can I ensure both the wrap div and the footer are centered properly, with the footer being sticky?