Contributions
A way to center 800px using CSS
This contribution uses CSS, NOT a table, to
set the width of the page for 800px screen
and center the page on the screen.
It’s simple, only 9 lines of code, and works.
Was discussed in http://forums.oscommerce.com/index.php?showtopic=82721 before submitting it.
Expand All / Collapse All
I couldn't get the #centerpage to work correctly until I changed <div class="centerpage"> to <div id="centerpage"> I also added a few other tweeks. Great contrib though.
body, html {
background: #C1C1C1;
color: #000000;
margin: 0px;
padding:0px;
text-align: center;
}
#centerpage{
width: 790px;
margin: 0px auto 0px auto;
background: White;
text-align: left;
}
Original version :
DIV.centerpage {
width: 770px;
position: absolute;
left: 50%;
top: 0;
margin-left: -385px;
}
----------------------------
Corrected Version :
.centerpage {
width: 770px;
position: absolute;
left: 50%;
top: 0;
margin-left: -385px;
}
This contribution uses CSS, NOT a table, to
set the width of the page for 800px screen
and center the page on the screen.
It’s simple, only 9 lines of code, and works.
Was discussed in http://forums.oscommerce.com/index.php?showtopic=82721 before submitting it.
Note: Contributions are used at own risk.