Forum Moderators: open
Let's say your entire page is within a div with the ID of "main" and you want it to be 720px wide. Then this set of CSS rules will center the page:
#main {
width:720px;
position:absolute;
left:50%
top:0;
margin-left:-360px;
}
See what's happening here? Instead of pixels, the absolute positioning uses percent - 50% for this case. Then the margin-left is NEGATIVE, and exactly half of the div's width (350px is half of 720px.) This makes the div fall half on one side of the 50% mark and half on the other side.
and this should diffenetly be working but it is not.
I cut all my layers, made a new one and pasted them in to it. Then applied the css to it. Seems easy enough. But all that appears is the the rightside on the leftside of my screen. Does that make sense? Its left justifing itself that much more...