Guest Posted May 20, 2003 Posted May 20, 2003 I only want my site to take up a certain amount of the page not the whole page by changing the table width, the wiki site says how to do it but when i follow their instructions i end up with problems. I would like it so my site takes up about 85% of the page and is centered. I was wondering if anyone could explain to me (a little bit better than the wiki does) how to do it. I would really appreciate it. Thanks for your time. :?
Guest Posted May 20, 2003 Posted May 20, 2003 In catalog/includes/header.php right after: if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT); } } ?> add: <center> <table width="85%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td align="center"> Next in catalog/includes footer.php right after: <br> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="center"><?php echo tep_display_banner('static', $banner); ?></td> </tr> </table> </TD> </TR> </TABLE> </center> add: </td> </tr> </table> </center> This will set your page center on the browser and at 85% of the width. HTH
Guest Posted May 21, 2003 Posted May 21, 2003 http://wiki.oscommerce.com/helpModsTableWidth You will have to change each file in your catalog folder plus the header and footer tables. You can change each table in the header in your editor. This is the first of the table code in each page in your catalog: <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> Do a search and replace and replace with: <!-- body //--> <table border="0" align="center" width="85%" cellspacing="3" cellpadding="3"> You can also change the cellspacing and cellpadding during this search and replace.
Silencer Posted May 21, 2003 Posted May 21, 2003 Why all you think that EACH file must be changed? You can modify just header.php and footer.php. Add following to begin of header.php (before first <?php tag) <table width="80%" cellpadding=0 cellspacing=0 border=0><tr><td> and following at end of footer.php </td></tr></table> This will be enough. Also you can define table width in pixels, not percents - just write width="600" for example. There is always more than one way to do it. And always Keep It Simple, Stupid.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.