Forums
This topic is locked
Centering page with negative margins
Posted 14 Jul 2007 14:19:13
1
has voted
14 Jul 2007 14:19:13 Ingela Grip posted:
I'm trying to get the content centered no matter browser/resolution, but the problem is that when the window is too small for the whole page to show - the user is not allowed to scroll up to the absolut top or to the absolute left? Only a part of the content can be shown - and the menu is unreachable. Please have a look at www.plainvanilla.seThe CSS looks like this:
#mainContent {
position: absolute;
visibility: visible;
margin-left: -480px;
margin-top: -340px;
left: 50%;
top: 50%;
width: 960px;
z-index: 1;
background-color: #000000;
}
Would really appreciate some help with this - I don't know what to do. Thanks in advance!
/Ingela