Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Centering Footer Text

    I have tried everything I know to center my footer text to match the front end of the website. I suspect it's something easy.

    You can see a live page in action here: http://www.lasilhouettelingerie.com/shop/privacy (I am only trying to center the footer text to match this page: http://www.lasilhouettelingerie.com/).

    The first thing you should know is that I removed most of my tpl_footer.php css rules and added my own (to match the front end of my website). On the front end it's centered, on the zen cart pages it is not.

    Here is my tpl_footer.php that shows the css rules:
    Code:
    <?php
    /**
     * Common Template - tpl_footer.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_footer.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_footer = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 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_footer.php 15511 2010-02-18 07:19:44Z drbyte $
     */
    ?>
    <?php
    if (!isset($flag_disable_footer) || !$flag_disable_footer) {
    ?>
    <!--bof-ip address display -->
    <?php
    if (SHOW_FOOTER_IP == '1') {
    ?>
    <div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . '  ' . $_SERVER['REMOTE_ADDR']; ?></div>
    <?php
    }
    ?>
    <!--eof-ip address display -->
    <!--bof-banner #5 display -->
    <?php
      if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
        if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
        }
      }
    ?>
    <!--eof-banner #5 display -->
    <!--This is where I enter all my custom footer information from the front end -->
    <div style="position: relative; background: url('/images/news_bg.gif') no-repeat; width: 808px; height: 100px; margin: auto; font-size: 10px; clear: both;">
     <? if (strtolower($_SERVER['PHP_SELF']) != '/awards-news.php') { ?>
      <a href="/awards-news.php"><img src="/images/awards_news.gif" width="218" height="18" alt="Awards & News" style="position: absolute; top: 0px; left: 410px;" /></a>
     <? } ?>
     
     <div style="position: absolute; top: 25px; right: 5px; width: 570px; font-size: 8px;">
      <span style="font-weight: bold; color: #bf1e2d; font-size: 10px; line-height: 18px;">We Carry the World's Finest Lingerie Brands...</span><br />
      Arlotta, Andre Sarda, B.Up, Bagley Mischka, BedHead, Betsey Johnson, Cass and Co., Chantelle, Cosabella, do mi, Elle Macpherson, Feraud, Foxers, Francis Smiley, Hanky Panky, Huit, Jane Woolrich, Jay Cris, Josie Natori, KayAnna, La Perla, Luisa Stefano, Lou Paris, Marie Jo, Maria Scotto, Natori, Oscar de la Renta, Prima Donna, Roseta, Simone Perele, Teccia, Verena, Wolford, and more.
     </div>
    </div>
    <div style="clear: both; height: 10px;"></div>
    <div id="box-wrapper">
     <div id="box-top"></div>
     
     <strong>For Fashion and Sale News</strong><br />
     <form name="subscribe" action="http://www.lasilhouettelingerie.com/...page=subscribe" method="post">
     <input type="hidden" name="act" value="subscribe" />
     <input type="text" name="email" size="18" maxlength="90" value="Enter email address" onfocus="if (this.value == 'Enter email address') this.value = '';" />
        <input type="image" src="/shop/includes/templates/latemplate1/buttons/english/button_subscribe.gif" alt="Subscribe" title=" Subscribe " value="Subscribe" />
    </form>
     
     <a href="http://www.facebook.com/pages/La-Sil...777833?ref=sgm" target="_blank"><img src="/images/facebook.gif" width="72" height="24" alt="Find Us On Facebook" style="margin: 7px;" /></a>
     <a href="http://twitter.com/La_Silhouette" target="_blank"><img src="/images/twitter.gif" width="57" height="24" alt="Follow Us On Twitter" style="margin: 7px;" /></a>
     
     <div id="box-bot"></div>
    </div>
    <div id="footer">
     <a href="/shop/accessories-c-157">Accessories</a> | 
        <a href="/shop/bustier-c-144">Bustier</a> |
        <a href="/shop/dresses-c-172">Dresses</a> | 
     <a href="/shop/hosiery-c-141">Hosiery</a> | 
     <a href="/shop/tops-c-145">Tops</a> | 
     <a href="/shop/bras-c-1">Bras</a> | 
     <a href="/shop/panties-c-66">Panties</a> | 
     <a href="/shop/matching-sets-c-103">Matching Sets</a> | 
     <a href="/shop/loungewear-c-68">Loungewear</a> | 
     <a href="/shop/nightwear-c-67">Nightwear</a> |
     
     <br />
     
     <a href="/shop/bodysuits-c-70">Bodysuits</a> | 
     <a href="/shop/bridal-c-140">Bridal</a> | 
        <a href="/shop/sale-c-71">Sale</a> | 
     <a href="/shop/shop-by-designer-c-72">Shop by Designer</a> | 
     <a href="/shop/shop-by-price-c-82">Shop by Price</a> | 
     <a href="/shop/gift-certificates-c-21">Gift Certificates</a> | 
     <a href="/awards-news.php">Awards and News</a> | 
     <a href="/">Home</a>
     
     <br />
     <a href="/shop/shippinginfo">Shipping & Returns</a> | 
     <a href="/shop/privacy">Privacy Notice</a> | 
     <a href="/shop/conditions">Conditions of Use</a>
     
     <br />
     
     <div style="margin-top: 7px; line-height: 14px;">
      <?= date('Y') ?> &copy; La Silhouette, LLC<br />
      <span style="font-size: 8px;">Website Hosted at: Host Leopard Ohio ~ Designed By: Diana Puppin / dp Design</span>
     </div>
    </div>
    <div style="clear: both; height: 10px;"></div>
    <!--This is where I enter all my custom footer information from the front end -->
    <?php
    } // flag_disable_footer
    ?>
    Here are my css rules that apply to this tpl_footer.php file:
    Code:
    #box-wrapper {
     float: left;
     background: url("/images/box_mid.gif") repeat-y;
     width: 183px;
     margin: 10px 0 10px 37px;
     font-size: 10px;
     line-height: 20px;
     text-align: center;
    }
    #box-wrapper p {
     margin: 0 15px;
     font-size: 10px;
     text-align: left;
    }
    #box-top {
     background: url("/images/box_top.gif") no-repeat;
     height: 9px;
    }
    #box-bot {
     background: url("/images/box_bot.gif") no-repeat;
     height: 11px;
    }
     
    #footer {
     float: right;
     width: 575px;
     margin: 10px 0 0 0;
     font-size: 9px;
     line-height: 16px;
    }
    All of the css rules are shown above. Any ideas would be greatly appreciated.

  2. #2
    Join Date
    Jun 2010
    Location
    USA
    Posts
    174
    Plugin Contributions
    0

    Default Re: Centering Footer Text

    Did you read the FAQ's? They was very helpful when I started 2 months ago. I looked at a link for ref so here is the link in the FAQ's
    https://www.zen-cart.com/tutorials/i...hp?article=257

  3. #3
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Centering Footer Text

    Thank you David I did read the FAQ's. There are not instructions for the layout that I am trying to achieve. This is a css setting that I am not familair with.

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

    Default Re: Centering Footer Text

    Here is my tpl_footer.php that shows the css rules:
    You are hacking this all up by styling inline in the php file
    Styling belongs in the stylesheet
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Centering Footer Text

    Kobra,

    Someone else designed the front few pages of the website that look like this: http://www.lasilhouettelingerie.com/ This person had no idea as to how to customize zen cart to match their template.

    So I the older webmaster who knows zen cart cusomization (especially with your help) had to fix their template and implement it into Zen Cart.

    I am not that good in css but usually I can manage. Trying to match their specifications in zen cart is backwards. This should have all been done in Zen Cart and then the front pages should have been done.

    I am stuck trying to match their template when I know just enough css to make me dangerous (usually through trial and error).

    So unfortunately (just like the header) the only way I could get them to match was use some of their inline css. I almost have their template matched, I just need to get this bottom text centered.

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

    Default Re: Centering Footer Text

    Find in the cart stylesheet your entry for footer
    Code:
    #footer {
        float: right;
        width: 575px;
        margin: 10px 0 0 0;
        font-size: 9px;
        line-height: 16px;
    }
    Try adding the highlighted entry to it
    Code:
    #footer {
        float: right;
        text-align: center;
        width: 575px;
        margin: 10px 0 0 0;
        font-size: 9px;
        line-height: 16px;
    }
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Centering Footer Text

    That was it? I thought I had tried that and it did not work. It works now thank you!

    Do you know how to center the text right above that footer text (in the gray box) and says this:
    Code:
    We Carry the World's Finest Lingerie Brands...
    Arlotta, Andre Sarda, B.Up, Bagley Mischka, BedHead, Betsey Johnson, Cass and Co., Chantelle, Cosabella, do mi, Elle Macpherson, Feraud, Foxers, Francis Smiley, Hanky Panky, Huit, Jane Woolrich, Jay Cris, Josie Natori, KayAnna, La Perla, Luisa Stefano, Lou Paris, Marie Jo, Maria Scotto, Natori, Oscar de la Renta, Prima Donna, Roseta, Simone Perele, Teccia, Verena, Wolford, and more.
    Somehow they have it centered between the image and the right side of the page.

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Centering Footer Text

    Do you know how to center the text right above that footer text (in the gray box)
    That is in an un-named div so I would name it and strip the inline styling out of it
    Being named you can use the stylesheet
    Code:
    <div style="position: absolute; top: 25px; right: 5px; width: 570px; font-size: 8px;">
            <span style="font-weight: bold; color: #bf1e2d; font-size: 10px; line-height: 18px;">We Carry the World's Finest Lingerie Brands...</span><br />
            Arlotta, Andre Sarda, B.Up, Bagley Mischka, BedHead, Betsey Johnson, Cass and Co., Chantelle, Cosabella, do mi, Elle Macpherson, Feraud, Foxers, Francis Smiley, Hanky Panky, Huit, Jane Woolrich, Jay Cris, Josie Natori, KayAnna, La Perla, Luisa Stefano, Lou Paris, Marie Jo, Maria Scotto, Natori, Oscar de la Renta, Prima Donna, Roseta, Simone Perele, Teccia, Verena, Wolford, and more.
        </div>
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Centering Footer Text

    Thank you for your guidance Kobra! I don't understand why this designer can write clean .php with includes and css stylesheet, then get lazy and put inline code.

    I have it and it looks nice. Best of all, per your suggestion it's probably coded better now.

  10. #10
    Join Date
    Jul 2010
    Location
    Battle Ground, WA
    Posts
    273
    Plugin Contributions
    1

    Default Re: Centering Footer Text

    I dont have a #footer in my stylesheet

    Where can I find it? I want to center my footer text...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. centering page loses footer
    By Ivanna in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Jul 2011, 05:05 PM
  2. Centering the footer?
    By cchan in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 15 Mar 2011, 09:31 PM
  3. centering footer banner and copyright
    By hoygs740 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Dec 2010, 05:42 AM
  4. vertical centering of text
    By finlander in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Nov 2010, 06:37 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR