Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    141
    Plugin Contributions
    0

    Default Shopping Cart Sub-Total

    I've searched and tried to fix this on my own, but alas I need some help. The Sub-Total .lineTitle and the .totalBox will not stay on the same line.


    I attached an image of my shopping cart so you don't have to hit the site.

    www.sweetzouzou.com


    from my stylesheet

    .totalBox {
    text-align: right;
    padding: 0.2em;
    }

    .lineTitle, .amount {
    text-align: right;
    padding: 0.2em;
    }


    from tpl_modules_order_totals.php
    ?>
    <?php
    /**
    * Displays order-totals modules' output
    */
    for ($i=0; $i<$size; $i++) { ?>
    <div id="<?php echo str_replace('_', '', $GLOBALS[$class]->code); ?>">
    <div class="lineTitle larger forward"><?php echo $GLOBALS[$class]->output[$i]['title']; ?></div>
    <div class="totalBox larger forward"><?php echo $GLOBALS[$class]->output[$i]['text']; ?></div>
    </div>
    <br class="clearBoth" />
    <?php } ?>

    I hope this is an easy one ;-)
    Thx Sweet
    Attached Images Attached Images  

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Shopping Cart Sub-Total

    Divs are funny things ... if you have a couple of divs inside a div container and both the divs are floated to the right they work great as long as their total width doesn't exceed the width of the container they are in. If that happens they stack - no matter what you do.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Nov 2007
    Posts
    141
    Plugin Contributions
    0

    Default Re: Shopping Cart Sub-Total

    I don't know how this worked, but I took a hint from Kim and added width to the #orderTotals, .lineTitle and .totalBox and played around with the justification and width. I moved things around 1 step at a time and finally got the .lineTitle left justified and the .totalBox right justified and they lined up. I then continued to change the width to move things closer together and ended up deleting all the width codes.


    from my stylesheet

    #orderTotals {
    float: right;
    }

    .lineTitle, .amount {
    float: left;
    text-align: left;
    padding: 0.2em;
    }

    .totalBox {
    text-align: right;
    padding: 0.2em;
    margin: 0 20px 0 0;
    }
    Attached Images Attached Images  

 

 

Similar Threads

  1. v150 Customizing Shopping Cart Sidebox, Sub Total, Vat and Layout
    By mattk251285 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 25 Feb 2013, 04:46 PM
  2. shopping cart total and sub total missmatch v1.3.8
    By James Dunstone in forum General Questions
    Replies: 0
    Last Post: 15 Jun 2011, 09:51 PM
  3. Shopping Cart item and sub-total tax USD
    By DanP in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 26 Jan 2010, 05:37 PM
  4. Hide Sub total in shopping cart page
    By eleven01 in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 27 Apr 2009, 10:11 AM

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