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?
center page - problems with firefox and opera
Re: center page - problems with firefox and opera
Take the float: left; out of the pagewrapper div. You don't need to float it.
Nullig
Nullig
Re: center page - problems with firefox and opera
I did, it's the same as float: center.
The host server is down now, I hope it won't take too long and I will attach a print screen with float left, float center and no float. If it's not float, I can't imagine where is the problem.
Thanks.
The host server is down now, I hope it won't take too long and I will attach a print screen with float left, float center and no float. If it's not float, I can't imagine where is the problem.
Thanks.
Re: center page - problems with firefox and opera
Can you post a link to the site, so we can see what's happening?
Nullig
Nullig
Re: center page - problems with firefox and opera
Well, changing your pagewrapper div to:
div#pagewrapper {
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;
}
centers it for me. Of course, you have some other issues there with your styling.
Nullig
div#pagewrapper {
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;
}
centers it for me. Of course, you have some other issues there with your styling.
Nullig
Re: center page - problems with firefox and opera
it centers it for me too, the problem is that centered in Firefox and Opera doesn't show the background, the text is highlighted in white, it just looks crazy, unfinished. When I float it to left, everything is just fine. But not all pages, some of them.
Re: center page - problems with firefox and opera
my site is back now. I attached 2 print screens: no float and float left. The site should look like "float left", but centered
Re: center page - problems with firefox and opera
It looks like you have an extra closing div just before the content div, which is closing the pagewrapper.
Nullig
Nullig
Re: center page - problems with firefox and opera
Yes, I did. Stupid me . It looks just fine, now. Thanks a lot!