Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Center Content in OsCommerce Alpha4 ?


rogalde

Recommended Posts

Hi! I would like to center the page content.

 

1º) I add to BODY in stylesheet.css => width: 760px;

2º) I add to #pageHeader in stylesheet.css => width: 760px;

 

But... I just got that I was aligned to the left and not in the center of page.

 

How can I do?

 

Thanks!

 

PD: Sorry for my English!

Link to comment
Share on other sites

Hi! I would like to center the page content.

 

1º) I add to BODY in stylesheet.css => width: 760px;

2º) I add to #pageHeader in stylesheet.css => width: 760px;

 

But... I just got that I was aligned to the left and not in the center of page.

 

How can I do?

 

Thanks!

 

PD: Sorry for my English!

 

You're english is fine, don't worry about it. ;-)

 

What I did for my sites is go into my includes/application_top.php and at the bottom put in define('SITE_WIDTH', 760);

 

After that, I go through all of my main files that are in the catalog folder, find the first instance of <table, and then change width="100%", to width="<?php echo SITE_WIDTH; ?>" You should have to do that in the includes/header.php file, but it would be good practice, just to stay consistent. Same with includes/footer.php.

 

This way is nice because if you need to change the entire width of your site, you only need to go to one place.

Link to comment
Share on other sites

It's Solved

 

BODY {

padding-right: 0px;

padding-left: 0px;

font-size: 11px;

min-height: 100%;

padding-bottom: 0px;

margin: 0px auto;

width: 1001px;

line-height: 1.5;

padding-top: 0px;

font-family: Verdana, Arial, sans-serif;

position: relative;

background-color: #ffffff;

}

 

in... \templates\default\stylesheet.css

 

ONLYE OSCva4

 

THANKS!!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...