You browse for templates for your web site, you finally found one and you want to create something of the sort.
My first problem is getting things to look right.
Ever wonder how fixed position containers stay at the center of a page?
hello, margin.
#container
{
//the fixed size width of your page.
width: 900px;
height: auto;
background-color: #fff;
border:0;
overflow:auto;
padding-bottom: 100px;
font-size: 10pt;
//these center the divs nicely on the page.
margin-left: auto; margin-right: auto;
}
Make sure your main #container that houses your entire site has a left and right margin of :auto .
So the next time you want a Div centered to the page. You know what to do.
Advertisement
Discussion
No comments yet.