Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to get rid of the border around my site?


shayrgob

Recommended Posts

Posted

This is what the "Center Shop" contribution causes - ugly sites.

 

Get rid of it from header and footer. Or at least thin down the nested tables the it creates.

 

"Center Shop" is nasty.

Posted

My site is not created using osCommerce. It uses pure xhtml and .css which would not be practical for your needs.

 

All you need to do is to remove the "Center Shop" code. Did you add it in the first place, or was it done for you by someone else?

Posted

You can still have your page centered. Just remove all the Center Shop code, and replace it with a

 

<table width="xxx" cellspacing="0" cellpadding="0" border="0">
 <tr>
   <td>

 

in the header. Obviously you would change xxx to the amount of pixels or percent that you want the width of your shop to be.

 

And in the footer, close the table:

 

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

 

You could also use a couple of <div> containers but the above code will do what you want.

Posted

Backup...Backup...Backup

This will create you a centered shop, compatible with 800x600 screen res and up and it will place a border around your site.

 

First open up your catalog/includes/header.php

 

At the top you will see something pretty much like

 

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

At line 12 or 13 you want to add the following:

 

   //begin dead easy outer table
  
    print ('<table width="790" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#000000">
      
    <tr>
      <td bgcolor="#FFFFFF">');
      
  //end dead easy outer table

And that's it, job done!

 

To change the color of the border change the first number

 

#000000

 

To change the color of the table content/background change the second number.

 

To change the width of the outline/border change the value of cellspacing

 

e.g. for a 1 pixel border change cellspacing="2"

 

to be cellspacing="1"

Posted

Alright, thanks guys! I actually just went into header and changed the cell padding in there and it worde great.

 

dolalu: Yes, i realized that last night and i cant believe i made that mistake. It will be fixed soon!

Posted
And that's it, job done!

Why would you need to use the php "print" function to print the table to the screen ?

 

What about closing the table you just opened ?

 

By only doing what you have posted, it will cause some serious HTML errors (never a good thing!)

Archived

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

×
×
  • Create New...