noiseordinance
06-30-2010, 10:49 PM
Hi there. I am working on a website that unfortunately was required to be centered horizontally and vertically using margin: auto in the body tag. This, as expected, is causing real nightmares with Lightbox variants as the do not properly center on the screen. However, when I remote margin: auto or change it to margin: 0, it centers perfect. Can anyone help me? I've been pulling my hair out for days on this.
Here's the code for the body:
body {
font: normal 12px/normal Arial, sans-serif;
color: #eaeaea;
background-color: #3D3A32;
width: 1100px;
height: 768px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: 0px;
border: none;
}
Here's the code for the body:
body {
font: normal 12px/normal Arial, sans-serif;
color: #eaeaea;
background-color: #3D3A32;
width: 1100px;
height: 768px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: 0px;
border: none;
}