I am coding a new layout and it's set up in div.
I have them auto-centered on the page using ' margin: 0 auto; ' in the container div, as well as subsequent other divs:
Code: Select all
#container {
margin:0 auto;
width: 800px;
}
#header {
width: 800px;
height: 430px;
}
#content {
margin: 0 auto;
width: 725px;
text-align: justify;
font-family: Century Gothic, sans-serif;
font-size: 12px;
color: #7D7D7D;
letter-spacing: 2px;
}
#footer {
margin: 0 auto;
width: 725px;
text-align: justify;
font-family: Century Gothic, sans-serif;
font-size: 12px;
color: #7D7D7D;
letter-spacing: 2px;
}
Does anyone know how I could a.) do this with the existing code or b.) a better code for auto-center that will allow me to adjust the top margin as needed XD.
Thank you in advance! <3
Edit: I've tried using margin-left: auto; + margin-right: auto; and margin-top: -10px;
but it threw everything off and didn't even close the space. :/