Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    310
    Plugin Contributions
    0

    Default Shopping Cart Header - Alignment Issue

    Hi all,

    I've started work on a new site, and for the life of me cannot solve a problem regarding the cart header.

    The addon I am using is: shoppingcartfreeshipinheader1-1 from the downloads section.

    Site URL is: adatglobal.com


    I have the following definition in the stylesheet.css for its positioning:

    #cartHeader {
    background:none repeat scroll 0 0 #CACACA;
    border:1px solid #888888;
    color:#000000;
    position:absolute;
    right:218px;
    text-align:center;
    top:15px;
    width:153px;
    }

    Now - this seems to work fine on my computer (in IE, FF, Safari and Chrome browsers), but on other screen resolutions the cartHeader changes position.

    I was sure it must be a defining value in the header that is a % (hence the changing on different screen resolutions) but alas I cannot find anything.

    Just wondering if I am being blind, and or stupid and any help would be appreciate...
    Steve
    Site Under Construction: adatglobal.com

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Shopping Cart Header - Alignment Issue

    Tyr changing your right entry to left and start with 800px
    This will always align to the left even if the right grows
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2009
    Posts
    310
    Plugin Contributions
    0

    Default Re: Shopping Cart Header - Alignment Issue

    Thanks for your help Kobra. I'll implement that - will work absolutely fine for 90+ percent of users as my page width is only 917px in any case.

    For the purist though - logically (in my still very amateur eyes) I see that the code from my tpl_header.php for this module:

    <!--bof-shoppingcart/freeship display-->
    <?php require($template->get_template_dir('tpl_cart_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_cart_header.php'); ?>
    <!--eof-shoppingcart/freeship display-->

    Retrieves its instruction and orders from the tpl_cart_header.php file

    In this file I see the following first 8 lines of code:

    <div id="cartHeader">
    <h3><?php echo CART_HEADER_TITLE; ?></h3>
    <div id="cartCount">
    <?php
    $cart_count = $_SESSION['cart']->count_contents();
    if ($cart_count) {
    $_SESSION['cart']->get_products();
    $basket_total = $_SESSION['cart']->show_total();
    echo '<span id="cartTotal">' . CART_HEADER_TOTAL . $currencies->format($basket_total) . '</span>' ;

    I'm still finding my way around PHP - and have w3 schooled it - but could this <span></span> command be causing the underlying issue?

    I understand it may not be high on anyone's priority list - I'd just like to understand better and have fewer workarounds on this my second site.

    Thanks

    Steve
    Steve
    Site Under Construction: adatglobal.com

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Shopping Cart Header - Alignment Issue

    Was that css entry yours or did it come with the module?
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2009
    Posts
    310
    Plugin Contributions
    0

    Default Re: Shopping Cart Header - Alignment Issue

    The CSS entry was the original modified. For test and fixing purposes I have replaced my code with the original which is

    /*Shoppingcart/Freeship in Header*/
    #headerWrapper {position: relative;}

    #cartHeader {
    width: 17em;
    position: absolute;
    top: 4.0em;
    right: 2.0em;
    background: #cacaca;
    color: #000000;
    border: 1px solid #888888;
    }

    #cartHeader h3 {
    text-align: center;
    }
    #cartCount {
    border-top: 1px solid #999999;
    text-align: center;
    }
    #cartCount a {)
    #cartTotal {}
    #cartFreeShip {
    margin: 0 0.3em;
    }
    #cartCheckout {
    float: right;
    margin: 0.3em;
    }

    However this still seems to be of a 'fluid' nature and behaves exactly the same. If it is hard coded into the PHP then I am darned if I can recognize it.

    I have never had an issue like this using 'absolute' positioning before.
    Steve
    Site Under Construction: adatglobal.com

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Shopping Cart Header - Alignment Issue

    I have never had an issue like this using 'absolute' positioning before.
    Think back - did you try to register it on the right?
    Right is the fluid side
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jan 2009
    Posts
    310
    Plugin Contributions
    0

    Default Re: Shopping Cart Header - Alignment Issue

    I think I have fixed it - I must have had it in the wrong place in the tpl_header.php. I was sure I had tried all the combination but clearly I had made a mistake. Still I am slowly getting a better understanding (I think )

    Moving the code for the freeship header to just above:

    <!--eof-navigation display-->
    </div>
    <!--<br class="clearBoth" />-->
    <!--eof-branding display-->
    <!--eof-header logo and navigation display-->

    Seems to have stopped it being forced out and is allowing it to stay inline with the rest of the header and other items when the page is compressed horizontally.

    I apologize for troubling you and appreciate your help...
    Steve
    Site Under Construction: adatglobal.com

 

 

Similar Threads

  1. Replies: 1
    Last Post: 22 Dec 2014, 08:55 PM
  2. Header Alignment Issue Z138a
    By cs_jono in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Apr 2010, 03:10 AM
  3. Alignment issue in IE - Header and left column
    By chequepoint in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Dec 2008, 05:33 AM
  4. Shopping cart header alignment
    By msatkn in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Jun 2008, 05:00 PM
  5. Header alignment issue in IE, Fine in FF - suggestions, please?
    By abcisme in forum Templates, Stylesheets, Page Layout
    Replies: 18
    Last Post: 17 May 2007, 07:12 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