Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Am I just stoopid? pls help


jonathan01

Recommended Posts

Please take a look at my top header - http://www.powerbackgrounds.com

OK see the gap of white at the top - I need this set as being aligned to the very top of the page but I cannot see where to do it?? I know how to make the navigation bar higher but it still keeps a margin at the top - any help would really be appreciated as I have searched for about 3 hours on the forums without any luck - thanks people!

Link to comment
Share on other sites

Some where in your html, you have a "hard return" (enter key), not only that you have other problems too. Here is what I come up with:

 

<html dir="LTR" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>

PowerBackgrounds - the most affordable, professional and unique premade website

templates

</title>

<base href="http://www.powerbackgrounds.com/catalog/">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<table border="0" align="center" width="900" cellspacing="0" cellpadding="0">

<tr class="headerNavigation">

<td class="headerNavigation">

  

<a href="http://www.powerbackgrounds.com/catalog/default.php?osCsid=1e265d3de4436d1742af0cd11920204e" class="headerNavigation">Catalog</a>

</td>

<td align="right" class="headerNavigation">

<a href="http://www.powerbackgrounds.com/catalog/account.php?osCsid=1e265d3de4436d1742af0cd11920204e" class="headerNavigation">My Account</a>

 | 

<a href="http://www.powerbackgrounds.com/catalog/shopping_cart.php?osCsid=1e265d3de4436d1742af0cd11920204e" class="headerNavigation">Cart Contents</a>

 | 

<a href="http://www.powerbackgrounds.com/catalog/checkout_shipping.php?osCsid=1e265d3de4436d1742af0cd11920204e" class="headerNavigation">Checkout</a>

  

</td>

</tr>

</table>

<table border="0" align="center" width="900" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle" bgcolor="eeeee6">

<div align="center">

<img src="http://www.powerbackgrounds.com/images/top_banner.gif" alt="" name="template_r2_c2" width="900" height="77" border="0" usemap="#template_r2_c2Map">

</div>

</td>

</tr>

<tr>

<td width="100%">

<map name="template_r2_c2Map">

<area shape="rect" coords="504,50,547,70" href="http://www.powerbackgrounds.com/catalog/conditions.php">

<area shape="rect" coords="361,50,400,70" href="http://www.powerbackgrounds.com/catalog/shipping.php">

<area shape="rect" coords="407,50,496,70" href="http://www.powerbackgrounds.com/catalog/privacy.php">

<area shape="rect" coords="294,50,353,70" href="http://www.powerbackgrounds.com/catalog/tutorial.php">

<area shape="rect" coords="206,50,285,70" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=53">

<area shape="rect" coords="137,50,197,70" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=51">

<area shape="rect" coords="60,50,126,70" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=21">

<area shape="rect" coords="10,50,53,70" href="http://www.powerbackgrounds.com/catalog/default.php">

<area shape="rect" coords="683,50,896,70" href="http://www.powerbackgrounds.com/catalog/affiliate_info.php">

<area shape="rect" coords="567,50,681,70" href="http://www.powerbackgrounds.com/catalog/contact_us.php">

</map>

</td>

</tr>

</table>

<!-- header_eof //-->

<!-- body //--><br>

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

<tr>

 

BLAH, BLAH, BLAH

 

some correction in the html code

 

Netnut

Link to comment
Share on other sites

THanks all for replying so quickly - I looked around line 48 but don't see the   - so I removed all instances of the   - no luck - here is the code from my header.php if anyone can see what I did wrong I will be eternally grateful:

 

<?php

/*

$Id: header.php,v 1.39 2003/02/13 04:23:23 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')) {

tep_output_warning(WARNING_INSTALL_DIRECTORY_EXISTS);

}

}

 

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

tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT);

} elseif (!is_writeable(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE);

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

tep_output_warning(WARNING_SESSION_AUTO_START);

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT);

}

}

?>

<SCRIPT LANGUAGE="JavaScript" SRC="http://www.w3exit.com/popup.php?account=aky01"></SCRIPT>

<body topmargin="0">

<table border="0" valign="top" align="center" width="900" 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>

<table border="0" align="center" width="900" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle" bgcolor="eeeee6"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'spacer.gif', 'osCommerce') . '</a>'; ?>

<div align="center"><img src="http://www.powerbackgrounds.com/images/top_banner.gif" alt="" name="template_r2_c2" width="900" height="77" border="0" usemap="#template_r2_c2Map"></div></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 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 $HTTP_GET_VARS['info_message']; ?></td>

</tr>

</table>

<?php

}

?>

<table border="0" align="center" width="<?php echo PAGE_WIDTH; ?>" cellspacing="0" cellpadding="0">

? <td width="100%">

<map name="template_r2_c2Map">

<area shape="rect" coords="504,50,547,70" href="http://www.powerbackgrounds.com/catalog/conditions.php">

<area shape="rect" coords="361,50,400,69" href="http://www.powerbackgrounds.com/catalog/shipping.php">

<area shape="rect" coords="407,50,496,70" href="http://www.powerbackgrounds.com/catalog/privacy.php">

<area shape="rect" coords="294,51,353,68" href="http://www.powerbackgrounds.com/catalog/tutorial.php">

<area shape="rect" coords="206,50,285,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=53'>http://www.powerbackgrounds.com/catalog/default.php?cPath=53">

<area shape="rect" coords="137,50,197,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=51'>http://www.powerbackgrounds.com/catalog/default.php?cPath=51">

<area shape="rect" coords="60,49,126,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=21'>http://www.powerbackgrounds.com/catalog/default.php?cPath=21">

<area shape="rect" coords="10,49,53,70" href="http://www.powerbackgrounds.com/catalog/default.php">

<area shape="rect" coords="683,5,896,73" href="http://www.powerbackgrounds.com/catalog/affiliate_info.php">

<area shape="rect" coords="567,49,681,70" href="http://www.powerbackgrounds.com/catalog/contact_us.php">

</map>

Link to comment
Share on other sites

Thanks again for your replies and suggestions - I'm still not getting anywhere :cry:

 

Here is the section from default (I think) that your referring to but I don't see anything:

 

<?php

/*

$Id: default.php,v 1.81 2003/02/13 04:23:23 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . $current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

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

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

Link to comment
Share on other sites

Jonathan,

 

I think I would save the header as header-ori.php.

 

Then I would take everything out of the header and put one table in at a time, then upload it and see what is happening.

Link to comment
Share on other sites

OK well I moved my "menu graphic" table above the breadcrumb and it hits the top of the page perfect now - but I now have a gap between the header menu and the breadcrumb so I MUST have a spacce in the code in the breadcrumb table - but I cannot see it anywhere - anyone else??

 

Here's the code again from the header.php:

 

<?php

/*

$Id: header.php,v 1.39 2003/02/13 04:23:23 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')) {

tep_output_warning(WARNING_INSTALL_DIRECTORY_EXISTS);

}

}

 

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

tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT);

} elseif (!is_writeable(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE);

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

tep_output_warning(WARNING_SESSION_AUTO_START);

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT);

}

}

?>

<SCRIPT LANGUAGE="JavaScript" SRC="http://www.w3exit.com/popup.php?account=aky01"></SCRIPT>

<body topmargin="0">

<table border="0" align="center" width="900" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle" bgcolor="eeeee6">

<div align="center"><img src="http://www.powerbackgrounds.com/images/top_banner.gif" alt="" name="template_r2_c2" width="900" height="77" border="0" usemap="#template_r2_c2Map"></div></td>

</tr>

</table>

<table border="0" valign="top" align="center" width="900" 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="2">

<tr class="headerError">

<td class="headerError"><?php echo 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 $HTTP_GET_VARS['info_message']; ?></td>

</tr>

</table>

<?php

}

?>

<table border="0" align="center" width="<?php echo PAGE_WIDTH; ?>" cellspacing="0" cellpadding="0">

? <td width="100%">

<map name="template_r2_c2Map">

<area shape="rect" coords="504,50,547,70" href="http://www.powerbackgrounds.com/catalog/conditions.php">

<area shape="rect" coords="361,50,400,69" href="http://www.powerbackgrounds.com/catalog/shipping.php">

<area shape="rect" coords="407,50,496,70" href="http://www.powerbackgrounds.com/catalog/privacy.php">

<area shape="rect" coords="294,51,353,68" href="http://www.powerbackgrounds.com/catalog/tutorial.php">

<area shape="rect" coords="206,50,285,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=53'>http://www.powerbackgrounds.com/catalog/default.php?cPath=53">

<area shape="rect" coords="137,50,197,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=51'>http://www.powerbackgrounds.com/catalog/default.php?cPath=51">

<area shape="rect" coords="60,49,126,69" href="http://www.powerbackgrounds.com/catalog/default.php?cPath=21'>http://www.powerbackgrounds.com/catalog/default.php?cPath=21">

<area shape="rect" coords="10,49,53,70" href="http://www.powerbackgrounds.com/catalog/default.php">

<area shape="rect" coords="683,5,896,73" href="http://www.powerbackgrounds.com/catalog/affiliate_info.php">

<area shape="rect" coords="567,49,681,70" href="http://www.powerbackgrounds.com/catalog/contact_us.php">

</map>

Link to comment
Share on other sites

Using a <div> will create whitespace sometimes. You don't need it.

 

<table border="0" align="center" width="900" cellspacing="0" cellpadding="0">

 <tr class="header"> 

   <td valign="middle" bgcolor="eeeee6"><img src="http://www.powerbackgrounds.com/images/top_banner.gif" alt="" name="template_r2_c2" width="900" height="77" border="0" usemap="#template_r2_c2Map"></td> 

 </tr> 

</table>

 

In fact you don't really need that whole table - it might as well be merged with the other.

Link to comment
Share on other sites

<table border="0" align="center" width="950" cellspacing="0" cellpadding="0"> 

? <td width="100%">

is missing a <tr> (actually, I don't see why you couldn't just delete that table--does it do anything?). If I edit the html that is generated to remove those two lines, the space disappears. It's right before the map code in the header.

 

Hth,

Matt

Link to comment
Share on other sites

I managed to do it just before the last post - I took the earlier advise of combining into one table the whole thing - in making this happen and cleaning the code somewhat it's all fixed and I'm as happy as a happy thing from planet happy thanks to you all offering the advise!

Once again my greatest thanks to you all for the quick replies and suggestions!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...