Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you get the header flush with the top of the page?


GeorgePowell

Recommended Posts

No one will be able to answer this until you post a link to the site.

:blush:

 

Could be a bazillion and one reasons for this....

:blink:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

In your /catalog/includes/header.php file, find this code:

 

<!-- header //-->
<table align="center" bgcolor="#ffffff" border="0" bordercolor="#000000" cellpadding="5" cellspacing="0" height="100%" width="760">

In that code, change:

 

cellpadding="5"

 

to

 

cellpadding="0"

 

It would be a good idea to make a backup of this file before making any edits.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

In your /catalog/includes/header.php file, find this code:

 

<!-- header //-->
<table align="center" bgcolor="#ffffff" border="0" bordercolor="#000000" cellpadding="5" cellspacing="0" height="100%" width="760">

In that code, change:

 

cellpadding="5"

 

to

 

cellpadding="0"

 

It would be a good idea to make a backup of this file before making any edits.

 

it was already "0", this has not resolved the issue, but thank you

Link to comment
Share on other sites

You're looking in the wrong place, Dude.

:blink:

 

Your HTML source still says:

 

<!-- header //-->
<table height="100%" width="760" align="center" BGCOLOR="ffffff" BORDER="0" bordercolor="000000" CELLSPACING="0" CELLPADDING="5" >

Note that the CELLPADDING="5" still exists.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

it was quoting what you'd said. my code is...

 

///////////////////	  

// [0001] Background Color ON/OFF and CellPadding for around the shop?

///////////////////

 

if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {

?>

<table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">

<tr><td>

<?php

}

Link to comment
Share on other sites

That's not the code you need to modify.

 

The first part doesn't match what's in the HTML:

 

<table height="100%" width="760"

The code you posted outputs this:

 

<table width="100%"

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

this is the whole header.php - i'm sorry, i don't understand what you mean...

 

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

*/

 

// 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');

}

 

///////////////////

///////////////////

// [0001] BOF: WebMakers.com Added: Center Shop

// This goes before any other table of the shop

//

// Is center Shop ON/OFF ?

///////////////////

 

if ( CENTER_SHOP_ON == 'on' ) {

 

///////////////////

// [0001] Background Color ON/OFF and CellPadding for around the shop?

///////////////////

 

if ( CENTER_SHOP_BACKGROUND_ON == 'on' ) {

?>

 

<table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>">

<tr><td>

<?php

}

 

 

///////////////////

// [0001] Shop Width Size and Shop Background Color

///////////////////

?>

<table height="100%" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >

<tr><td BGColor="FFFFFF">

<?php

 

///////////////////

// [0001] The rest of this <td> statement is located at the end of footer.php

///////////////////

}

?>

 

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

 

 

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

<tr class="header">

 

 

<td valign="middle" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '"><img border="0" src="logo.gif"></a>'; ?><br /><a href=" . tep_href_link(FILENAME_DEFAULT) . '"><img border="0" src="menu1.gif" class="domroll menu1hover.gif"/></a><a href=""><img border="0" src="menu2.gif" class="domroll menu2hover.gif"/></a><a href=""><img border="0" src="menu3.gif" class="domroll menu3hover.gif"/></a>

</td>

 

<?php /* <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

*/ ?>

</tr>

</table>

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

<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="0">

<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="0">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

</tr>

</table>

<?php

}

?>

Link to comment
Share on other sites

There are two ways you can do this.

 

Find the PHP file where CENTER_SHOP_CELLPADDING is defined and change it to 0

 

Or this code here:

 

/////////////////// 
// [0001] Shop Width Size and Shop Background Color
///////////////////
?>
<table height="100%" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="<?php echo CENTER_SHOP_CELLPADDING; ?>" >

Change it to:

 

/////////////////// 
// [0001] Shop Width Size and Shop Background Color
///////////////////
?>
<table height="100%" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>" BORDER="<?php echo CENTER_SHOP_BORDER; ?>" bordercolor="<?php echo CENTER_SHOP_BORDERCOLOR; ?>" CELLSPACING="<?php echo CENTER_SHOP_CELLSPACING; ?>" CELLPADDING="0" >

And hope CENTER_SHOP_CELLPADDING isn't used somewhere else where it will screw you up...

:blush:

 

It's a good idea to make a backup of anything before making any edits.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

:sweating:

 

:lol:

 

:thumbsup:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...