Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Center site!


Guest

Recommended Posts

Also it seems you have set the width to the center tables to 750 px... and some cells width to 250 px...

 

<table border="0" width="750" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center">

 <tr class="header" bgcolor="#ffffff">

   <td valign="middle" background="images/toppgrafikk1.gif"><img src="images/logo.gif" border="0" alt="piercingsmykker" title=" piercingsmykker " width="250" height="80"></td>

   <td align="right" valign="bottom" background="images/toppgrafikk1.gif"><img src="images/toppgrafikk.gif" border="0" alt="piercingsmykker" title=" piercingsmykker " width="250" height="80"></td>

 </tr>

</table>

 

Try setting them to 100% and they will resize with the screen size

Link to comment
Share on other sites

Actually the two tables already in header.php do not need to be touched.

 

You want to add a new table that starts above the two existing tables:

 

<table width="750" align="center"><tr><td>

 

Then at the bottom of the footer.php after the existing tables in there, you want to close the table:

 

</td></tr></table>

 

What this does is surround the whole shop in a table to contain it in the 750 width. Check your settings as you might want to use 748 for XP.

Link to comment
Share on other sites

You need to add a class then to the table. Possibly use a second table to handle the color settings etc.

 

The first table mainly is for containment. It gets the shop sized and centered.

Link to comment
Share on other sites

In the header.php before any other table I use this:

 

<?php /* BOF: WebMakers.com Added: Center Shop */ ?>

   <table width="100%" cellpadding="10" cellspacing="0" border="0" bgcolor="2F4F4F">

     <tr><td>

   <table BORDERCOLORLIGHT="2F4F2F" CELLSPACING="4" CELLPADDING="6" BORDER="3" width="750" align="center" BGCOLOR="FFFFFF">

     <tr><td BGColor="FFFFFF" BORDERCOLOR="FF0000">

<?php /* EOF: WebMakers.com Added: Center Shop */ ?>

 

In the footer.php after all tables I use this, the extra row is for spacing purposes:

 

<?php /* BOF: WebMakers.com Added: Center Shop */ ?>

     </td></tr>

   </table>

     </td></tr>

     <tr><td height="150"> </td></tr>

   </table>

<?php /* EOF: WebMakers.com Added: Center Shop */ ?>

 

It looks like this:

 

http://www.8thoctave.com/osc_freecall

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...