center page - problems with firefox and opera
Posted: Mon Apr 07, 2008 3:36 pm
I have a problem with centering the page on the screen. In IE it works perfect, but in firefox and opera, if I try to center the page looks extremely ugly (it doesn't show the background on all pages).
I have a stylesheet "layout: left sidebar + 1 column", to make the firefox and opera look fine. the problem is that I cannot make these two see my pages centered. The code I am using is:
basic layout
*****************/
body {
background-color: #7b1010;
color: #000000;
margin:1em; /* gives some air for the pagewrapper */
}
/* center wrapper, min max width */
div#pagewrapper {
float: left;
margin: 0 auto; /* this centers wrapper */
width: 800px; /* IE wont understand these, so we will use javascript magick */
background-color: #7b1010;
color: black;
background: url('images/cms/corp_bg.gif') repeat-y;
}
/*** header ***
we will hide text and replace it with a image
we need to assign a height for it so that the image wont cut off
*/
div#header {
height: 115px; /* adjust according your image size */
background: #7b1010;
}
/*****************
.
If I change float: center, everything goes wrong in firefox and opera.
I really want my page centered, because I made it 800*600 and it doesn't look ok on screen displaying a highresolution.
Can anybody help?
I have a stylesheet "layout: left sidebar + 1 column", to make the firefox and opera look fine. the problem is that I cannot make these two see my pages centered. The code I am using is:
basic layout
*****************/
body {
background-color: #7b1010;
color: #000000;
margin:1em; /* gives some air for the pagewrapper */
}
/* center wrapper, min max width */
div#pagewrapper {
float: left;
margin: 0 auto; /* this centers wrapper */
width: 800px; /* IE wont understand these, so we will use javascript magick */
background-color: #7b1010;
color: black;
background: url('images/cms/corp_bg.gif') repeat-y;
}
/*** header ***
we will hide text and replace it with a image
we need to assign a height for it so that the image wont cut off
*/
div#header {
height: 115px; /* adjust according your image size */
background: #7b1010;
}
/*****************
.
If I change float: center, everything goes wrong in firefox and opera.
I really want my page centered, because I made it 800*600 and it doesn't look ok on screen displaying a highresolution.
Can anybody help?