Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    55
    Plugin Contributions
    0

    Default Custom Header and Css alignment issues

    Hi,
    I have created a custome template and Im working on adding the header image with some hotspots in it. When I view the layout the entire header is shifter to the right by 2 pixles. I for the life of me cant figure out where in my code this is being caused. Perhaps someone could take a look at my tpl_header.php and css code. www.dakotafiresupply.com

    Any help would be great!!

    The css is only part there.

    TPL_header.php
    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.php
     *
     * this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * make a directory /templates/my_template/privacy<br />
     * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_header.php 3392 2006-04-08 15:17:37Z birdbrain $
     */
    ?>


    <!--Start Header Image-->
    <table align="center" width="750" border="0">
      <tr>
        <td width="750"><img src="http://dakotafiresupply.com/includes/templates/dakotafire/images/template_images/header.jpg" width="750" height="148" border="0" usemap="#Map" /></td>
      </tr>
    </table>
    <!--End Header Image-->
    <?php

      
    // Display all header alerts via messageStack:
      
    if ($messageStack->size('header') > 0) {
        echo 
    $messageStack->output('header');
      }
      if (isset(
    $_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo 
    htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset(
    $_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo 
    htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    <div id="headerWrapper">
    <?php /*?><!--bof-navigation display-->
    <div id="navMainWrapper">
    <div id="navMain">
        <ul class="back">
        <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
    <?php
          } else {
            if (STORE_STATUS == '0') {
    ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
    <?php } } ?>

    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
    <?php }?>
    </ul>
    </div>
    <div class="navMainSearch forward"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <br class="clearBoth" />
    </div><?php */
    ?>
    <!--eof-navigation display-->

    <!--bof-branding display-->
    <?php /*?><div id="logoWrapper">
        <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
        <div id="taglineWrapper">
    <?php
                  if (HEADER_SALES_TEXT != '') {
    ?>
          <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
    <?php
                  }
    ?>
    <?php
                  if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                    if ($banner->RecordCount() > 0) {
    ?>
          <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
    <?php
                    }
                  }
    ?>
        </div>
    </div>
    <br class="clearBoth" /><?php */
    ?>
    <!--eof-branding display-->

    <!--eof-header logo and navigation display-->

    <!--bof-optional categories tabs navigation display-->
    <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
    <!--eof-optional categories tabs navigation display-->

    <!--bof-header ezpage links-->
    <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE$_SERVER['REMOTE_ADDR'])))) { ?>
    <?php 
    require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
    <?php 
    ?>
    <!--eof-header ezpage links-->
    </div>
    <?php ?>
    <map name="Map" id="Map"><area shape="rect" coords="163,113,208,132" href="#" /><area shape="rect" coords="253,114,357,134" href="#" /><area shape="rect" coords="404,114,501,132" href="#" /><area shape="rect" coords="552,115,623,130" href="#" /><area shape="rect" coords="681,114,721,131" href="#" /><area shape="rect" coords="3,2,151,148" href="http://www.dakotafiresupply.com" /></map>

    CSS
    Code:
    /*warnings, errors, messages*/
    .messageStackWarning, .messageStackError, .messageStackSuccess, .messageStackCaution {
    	line-height: 1.8em;
    	padding: 0.2em;
    	border: 1px solid #000000;
    	}
    
    .messageStackWarning, .messageStackError {
    	background-color: #ff0000;
    	color: #ffffff;
    	}
    
    .messageStackSuccess {
    	background-color: #99FF99;
    	color: #000000;
    	}
    
    .messageStackCaution {
    	background-color: #FFFF66;
    	color: #000000;
    	}
    
    /*wrappers - page or section containers*/
    #mainWrapper {
    	background-color: #dedede;
    	text-align: left;
    	width: 750px;
    	vertical-align: top;
    	}
    
    #headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
    	margin: 0em;
    	padding: 0em;
    	}
    
    #navColumnOneWrapper, #navColumnTwoWrapper, #mainWrapper {
    	margin: auto;
    	} 
    
    #tagline {
    	color:#000000;
    	font-size: 2em;
    	text-align : center;
    	vertical-align: middle;
    	}
    
    #sendSpendWrapper {
    	border: 1px solid #cacaca;
    	float: right;
    	margin: 0em 0em 1em 1em;
    	}
    
    .floatingBox, #accountLinksWrapper, #sendSpendWrapper, #checkoutShipto, #checkoutBillto, #navEZPagesTOCWrapper {
    	margin: 0;
    	width: 47%;
    	}
    
    .wrapperAttribsOptions {
    	margin: 0.3em 0em;
    	}
    
    /*navigation*/
    
    .navSplitPagesResult {}
    .navSplitPagesLinks {}
    .navNextPrevCounter {
    	margin: 0em;
    	font-size: 0.9em;
    	}
    .navNextPrevList {
    	display: inline;
    	white-space: nowrap;
    	margin: 0;
    	padding:  0.5em 0em;
    	list-style-type: none;
    	}
    
    #navMainWrapper, #navSuppWrapper, #navCatTabsWrapper {
    	margin: 0em;
    	background-color: #9a9a9a;
    	font-weight: bold;
    	color: #ffffff;
    	height: 1%;
    	width: 100%;
    	}
    
    #navMain ul, #navSupp ul, #navCatTabs ul  {
    	margin: 0;
    	padding:  0.5em 0em;
    	list-style-type: none;
    	text-align: center;
    	line-height: 1.5em;
    	}
    
    #navMain ul li, #navSupp ul li, #navCatTabs ul li {
    	display: inline;
    	white-space: nowrap;
    	}
    
    #navMain ul li a, #navSupp ul li a, #navCatTabs ul li a {
    	text-decoration: none;
    	padding: 0em 0.5em;
    	margin: 0;
    	color: #ffffff;
    	}
    
    #navEZPagesTOCWrapper {
    	font-weight: bold;
    	float: right;
    	height: 1%;
    	border: 1px solid #000000;
    	}
    
    #navEZPagesTOC ul {
    	margin: 0;
    	padding:  0.5em 0em;
    	list-style-type: none;
    	line-height: 1.5em;
    	}
    
    #navEZPagesTOC ul li {
    	white-space: nowrap;
    	}
    
    #navEZPagesTOC ul li a {
    	padding: 0em 0.5em;
    	margin: 0;
    	}
    
    #navMainSearch, #navCategoryIcon, .buttonRow, #indexProductListCatDescription {
    	margin: 0.5em;
    	}
    
    #navBreadCrumb {
    	background-color: #cc9900;
    	}
    
    #navEZPagesTop {
    	background-color: #ffff33;
    	}
    
    #navBreadCrumb, #navEZPagesTop {
    	font-size: 0.95em;
    	font-weight: bold;
    	margin: 0em;
    	padding: 0.5em;
    	}
    
    #navColumnOne {
    	/*background-color: #FFCC99;*/
    	background-image:url(../images/template_images/left_col_bg.gif);
    	background-repeat:repeat-y;
    	}
    
    #navColumnTwo {
    	background-color: #f7931d;
    	}

  2. #2
    Join Date
    May 2006
    Posts
    55
    Plugin Contributions
    0

    Default Re: Custom Header and Css alignment issues

    I figured it out. I had the following code outside the div tags.

    PHP Code:
    {URL.info_message}
    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>

  3. #3
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Custom Header and Css alignment issues

    Thanks for posting fix, it may help another member..
    New template coming along fine.. well done!!

 

 

Similar Threads

  1. v139h Custom header issues
    By barendfaber in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 Aug 2012, 02:40 PM
  2. Some alignment and margin issues
    By zingslings in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 18 Sep 2009, 07:42 AM
  3. Header, MainWrapper, and Footer alignment issues
    By nettasaura in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Nov 2008, 04:25 AM
  4. Firefox and Alignment Issues
    By trisha1581 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 18 Jun 2008, 04:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg