Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Center the site, Cannot seen to do it, what am I missing


magtaf69

Recommended Posts

I want to center ny site, control the table widths sort of speak. I have looked at the wiki site but I cannot find this:

 

Setting the Table Width

 

 

We will change the width of your shopping cart to be centered on the page at a width of 770 pixels with no cellpadding or cellspacing.

 

In default.php

 

Change this:

 

 

<!-- body //-->

< table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

< !-- left_navigation //-->

 

To this:

 

 

<!-- body //-->

< table border="0" width="770" cellspacing="0" cellpadding="0" align="center">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

< !-- left_navigation //-->

 

You can do a find and replace in your editor and replace all the pages that have the same code as above at once.

 

Next, you must change the same settings in header.php and footer.php in your /catalog/includes directory.

 

Another way is to add a table set to a specified width to each file in the catalog/ folder ... copying the header, body, and footer into that table.

 

 

I cannot find the below code in red in the header.php and footer.php in your /catalog/includes directory that have this code. Can any one help me on this one??

 

<!-- body //-->

< table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

< !-- left_navigation //-->

 

EDITED: Moved to a more appropriate forum. My Store is to show off your store, not for help on something broken or something you are trying to change. Thanks, Linda

Link to comment
Share on other sites

I did it by adding

< table border="0" width="770" cellspacing="0" cellpadding="0" align="center">

<tr>

<td>

to the header.php as it is pulled by all the files and therefore I only needed to edit one file.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...