Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Posts
    3
    Plugin Contributions
    0

    Default seperate Header from fotter for width settings?

    Hi, Iv been rackin my head for a while,

    Its a bit difficult explaining the problem, I need to know how to separate the divs so I can set a separate width setting of 100% for the footer only,

    in the tpl_main_page.php I moved the header and footer out of the mainwrapper div but for some reason the footer inherits any set width I put in the stylesheet except the 100%, for example if I place size 1024px for the content wrapper the footer and header stays at 100% but if I set the header to 1024px the footer changes to 1024px too, if I then set a set size for the footer too like 1200px it works but the footer wont set to 100% no matter what I do.

    I then tried setting a custom div for the footer in the tpl footer php file and checked in firefox firebug and it was inheriting the style background color etc from the new div but still inheriting the size from the header

    the sites currently down I messed up the installation trying to get this to work so Im going to reinstall but would appreciate any advise as to why im unable to get the footer to set to 100% when the header has a width set.

    Really appreciate some advice.

    Thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: seperate Header from fotter for width settings?

    A link to the site would help.

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: seperate Header from fotter for width settings?

    In your CUSTOM template, you should have a copy of tpl_main_page.php in the "common" folder.

    If you don't have a custom file, then put a COPY of the core file of that name, in your custom template's "common" folder.

    The CORE behaviour is to include the FOOTER area in the main content area... see below for WHERE the final <div> appears (from about line 154 / 155):

    PHP Code:
    </table>

    <?php
     
    /**
      * prepares and displays footer output
      *
      */
      
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != or $_SESSION['customer_id'] == '')) {
        
    $flag_disable_footer true;
      }
      require(
    $template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_footer.php');
    ?>

    </div>
    If you now close the main content DIV after the </table> tag, then create a NEW DIV just for the footer, you should be able to style it differently...

    PHP Code:
    </table>
    </div>
    <div class="myCustomFooter">
    <?php
     
    /**
      * prepares and displays footer output
      *
      */
      
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != or $_SESSION['customer_id'] == '')) {
        
    $flag_disable_footer true;
      }
      require(
    $template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_footer.php');
    ?>

    </div>

    I haven't tried this, so it might not work... but it seems to make sense, so give it a go...

    As always... BACKUP original files first.
    19 years a Zencart User

  4. #4
    Join Date
    Apr 2012
    Posts
    3
    Plugin Contributions
    0

    Default Re: seperate Header from fotter for width settings?

    Thanks :) it worked, but I had to add a CSS div with position: absolute; in teh stylesheet also for it to show 100%

 

 

Similar Threads

  1. Three seperate images along the header.
    By FragaGeddon in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 31 Aug 2010, 01:09 AM
  2. Header seperate from main page
    By Doddsey_65 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 4 Jun 2009, 02:30 AM
  3. 100% width header - fixed width content
    By Empire402 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Jan 2007, 03:49 AM
  4. header and fotter is missing
    By modchipfitters.co.uk in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Sep 2006, 10:28 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