Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Site not centred


catalepticstate

Recommended Posts

Hi all,

I have just noticed that my site is not centered in resolutions other than 1024x768.

I used a contribute telling me to put the following code in the stylesheet:

 

DIV.centerpage {
 width: 760px;
 top: 0;
 position: absolute;
 left: 42%;
 margin-left: -27%;
 background: #FFFFFF;

}

 

Is there another way I can have it loading centered?

Visit My Website

Link to comment
Share on other sites

Your website doesn't seem to be working for me (database connection limit reached, thats a host issue though).

 

You've added the code mentioned to your css - have you added the code to your pages?

Link to comment
Share on other sites

Your website doesn't seem to be working for me (database connection limit reached, thats a host issue though).

 

You've added the code mentioned to your css - have you added the code to your pages?

Warning: mysql_connect() [function.mysql-connect]: Too many connections in /home/printnat/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

That is going to affect sales.

Link to comment
Share on other sites

Your website doesn't seem to be working for me (database connection limit reached, thats a host issue though).

 

You've added the code mentioned to your css - have you added the code to your pages?

 

Hi try now,

I have added it to my pages. It only centers the page when in 1024x768

Link to comment
Share on other sites

My sites are centered using this:

 

width: 980px;

border: solid; border-width: 1px;

background: #648EA7;

margin: auto;

margin-top: 0px;

text-align: left;

 

 

Of course you will want to edit that to for your size, colors and borders etc.

 

And under the body style I have this (just add the align:center; I've edited out the other stuff that doesnt contribute to your question):

 

body {

align: center;

}

Link to comment
Share on other sites

  • 2 weeks later...
My sites are centered using this:

 

width: 980px;

border: solid; border-width: 1px;

background: #648EA7;

margin: auto;

margin-top: 0px;

text-align: left;

Of course you will want to edit that to for your size, colors and borders etc.

 

And under the body style I have this (just add the align:center; I've edited out the other stuff that doesnt contribute to your question):

 

body {

align: center;

}

 

 

Hi this works for FF but its still left aligned when in IE (using IE 6) any chance of a ie hack?

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

In order to center your design properly you need to change it to:

 

DIV.centerpage {

width: 760px;

background: #FFFFFF;

margin: 0 auto;

}

 

body {

text-align: center;

}

 

* {

text-align: left'

}

 

---

cheerio mate

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...