Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Resize Page


Guest

Recommended Posts

Posted

Can anyone please explain to me how i go about resizeing my site as i want to make it so the site is inline with the top banner.

 

Thanks Alot

James

Posted

I mean as in move the Left and the Right in closer making the centre smaller and having blank space at the sides

 

James

Posted

The osc guide will tell you this, but in short, you have to modify the table widths from percents to pixesl.

 

I believe if I recall correctly, that there are three:

 

One in your default(or index).php and one in the header, and one in the footer.

 

Modify the width=100% to width=800px (or whatever) and you're done.

- - - -

Sometimes, ignorance is bliss.

Posted

is this to do with the tabs in the header

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

No this is to resize the site so the site is the same size as the top logo of the site.

Posted

do you have a url

 

make this in header.php

 

<?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
*/

//BORDER AROUND CART
print ('<table width="760" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
   
 <tr>
   <td bgcolor="#FFFFFF">');
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
 if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
   $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
 }
}

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

you may need to make the table width change

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

need you to post your header.php and footer.php

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

How do i change the size of the long grey box?

Posted

something is strange with the site can you post your header.php and footer.php

 

which file did you change the table in

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

1) you have a

<table width="720"

while your header image is 709px wide, change the table back to 100% width

 

2) you could add this:

<div style="text-align: center;"><div style="text-align: left; margin: 0 auto; width: 709px">

to includes/header.php

 

and to make it complete add:

</div></div>

to your includes/footer.php

Posted

and the whole site will be 709px wide (like you top image) and centered

 

(the 720px table is almost at the top)

Posted

the answer to the grey bar is in this code

<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
 <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
 <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
</tr>
</table>

that is the table for the bar, however I was initially giving you a solution but you did not provide the information requested in order to complete the task

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

oops I forgot: the opening div in header.php just before the first table tag and the closing /div just after the last closing table tag in footer.php

Posted

Sorry guys i lost connection last night and have only just managed to get back on.

 

Thanks for all your help!

 

James

Posted

Not too sure what i am doing wrong but here are the codes

 

Header

<?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 (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' 

directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
   if (file_exists(dirname(

$HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
     $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 

'warning');
   }
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
   if ( (

file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname(

$HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
     $messageStack->add('header', 

WARNING_CONFIG_FILE_WRITEABLE, 'warning');
   }
 }

// check if the session folder is writeable
 if (

WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
   if (STORE_SESSIONS == '') {
     if (!is_dir(tep_session_save_path())) {


      $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
     } elseif (!is_writeable(

tep_session_save_path())) {
       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
     }
  

}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
   

if (ini_get('session.auto_start') == '1') {
     $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
   }
 }



if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
   if (!is_dir(DIR_FS_DOWNLOAD)) {


    $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
   }
 }

 if ($messageStack->size(

'header') > 0) {
   echo $messageStack->output('header');
 }
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">


<tr class="header">
   <td valign="middle"><?php echo '<center><a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . 

tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'Jesters Magic') . '</a>'; ?></center></td>  </td>
 </tr>
</table>
<table 

border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation"

>  <?php echo $breadcrumb->trail(' » '); ?></td>
   <td align="right" class="headerNavigation"><?php if (

tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="

headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(

FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href

="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></

a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php 

echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && 

tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class

="headerError">
   <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 

</tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table 

border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo 

htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>
<?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
*/

//BORDER AROUND CART
print ('<table width="709" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  
<tr>
  <td bgcolor="#FFFFFF">');
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}

<br>

<br>

Footer

<?php
/*
 $Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
   <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
   <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center" class="smallText">
<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
?>
   </td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

 

i can't seem to get the grey bar smaller either.

 

James

Posted

The code that I gave you was meant to replace the top part of the code in your header.php here is the coded file

 

<?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
*/

//BORDER AROUND CART
print ('<table width="709" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
 
<tr>
 <td bgcolor="#FFFFFF">');
// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
 $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}

// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
  if ( (


file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname(

$HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
    $messageStack->add('header', 

WARNING_CONFIG_FILE_WRITEABLE, 'warning');
  }
}

// check if the session folder is writeable
if (

WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
  if (STORE_SESSIONS == '') {
    if (!is_dir(tep_session_save_path())) {


     $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
    } elseif (!is_writeable(

tep_session_save_path())) {
      $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
    }
 

}
}

// check session.auto_start is disabled
if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
  

if (ini_get('session.auto_start') == '1') {
    $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
  }
}



if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
  if (!is_dir(DIR_FS_DOWNLOAD)) {


   $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
  }
}

if ($messageStack->size(

'header') > 0) {
  echo $messageStack->output('header');
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">


<tr class="header">
  <td valign="middle"><?php echo '<center><a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . 

tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'Jesters Magic') . '</a>'; ?></center></td>  </td>
</tr>
</table>
<table 

border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
  <td class="headerNavigation"

>  <?php echo $breadcrumb->trail(' » '); ?></td>
  <td align="right" class="headerNavigation"><?php if (

tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="

headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(

FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href

="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></

a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php 

echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
</tr>
</table>
<?php
if (isset($HTTP_GET_VARS['error_message']) && 

tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class

="headerError">
  <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>


</tr>
</table>
<?php
}

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table 

border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="headerInfo">
  <td class="headerInfo"><?php echo 

htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
</tr>
</table>
<?php
}
?>

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

Sorry am I going to fast, or missing the point here?

 

the <table width="720" I can see in the HTML source, first of all you really have to change it to back to <table width=100%, else there will be no way to make the site 709px wide (which your top image is).

I'm note sure where you put it but it might be in your index.php file (it isn't in the files you posted).

Posted
Sorry am I going to fast, or missing the point here?

 

the <table width="720" I can see in the HTML source, first of all you really have to change it to back to <table width=100%, else there will be no way to make the site 709px wide (which your top image is).

I'm note sure where you put it but it might be in your index.php file (it isn't in the files you posted).

 

Huh?

 

and how do i get rid of the black box?

Posted

Jimz

 

you will have to make a choice of either using my code posts or paulm2003 you cannot use both or you end up with the distorted look that you have now.

 

View source shows that you are using my codes for the header but you are also using the <div> tags as well.

 

Once you have made a choice then if you go with the code I give I will tell you how to remove the black border or if you choose to go with paulm2003 code then he will help.

 

There is no point in both of us giving you code as this will only confuse you

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Posted

I will carry on using your code 241 as i am getting really lost at the moment.

Archived

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

×
×
  • Create New...