Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default can you make header and page different widths?

    I want my header to be white across the screen in the background, and the rest of the page to have the background colour. The only way I think I can do this is to make the header stretch accross the whole screen, while keeping the rest of the page as wide as it is.

    Can you make the header 100% while the rest of the page is 80%?

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: can you make header and page different widths?

    Certainly. Two ways.

    You could edit your site's common/tpl_main_page.php to move the header block outside of #mainWrapper and then set you #headerWrapper width to 100%

    or

    set the width of #mainWrapper to be 100%, and constrain the width of #contentMainWrapper. This would also result in a 100% wide footer.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: can you make header and page different widths?

    Thank you, that sounds easy. The first option is what I am trying to do. Only how do you move the header block out??? I am still a bit newish at this.

  4. #4
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: can you make header and page different widths?

    I don't have #mainwrapper in that file. I guess it may be css?..

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: can you make header and page different widths?

    Create an override for tpl_main_page.php as explained in the FAQ. Then in the override file move this block
    PHP Code:
    <?php
     
    /**
      * prepares and displays header output
      *
      */
      
    if (CUSTOMERS_APPROVAL_AUTHORIZATION == && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != or $_SESSION['customer_id'] == '')) {
        
    $flag_disable_header true;
      }
      require(
    $template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header.php');?>
    up one line, so that it comes before this
    PHP Code:
    <div id="mainWrapper"
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: can you make header and page different widths?

    Excellent! Worked a treat and looks awesome

  7. #7
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: can you make header and page different widths?

    Now just wondering one thing - how to stop the header scrolling with the rest of the page. So it stays put when you scroll down the rest of the page.

  8. #8
    Join Date
    Jul 2008
    Posts
    151
    Plugin Contributions
    0

    Default Re: can you make header and page different widths?

    having a bit of a problem. I changed as per above and its great. I am trying to move the content of the header so it is inline with the main page below it. I have been trying to pad margins. I have been able to do this with the logowrapper, but its having the wrong effect. The headerwrapper had the wrong effect too. What I am getting is the whole headerwrapper shrinking. I want it to stay at 100% but "pad" the sides like you do with tables. Here is the code I have in css:

    /*wrappers - page or section containers*/
    #mainWrapper {
    background-color: #ffffff;
    text-align: left;
    width: 80%;
    vertical-align: top;
    border: 1px solid #518240;
    }

    #headerwrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
    margin: 0em;
    padding: 0em;
    }

    #headerwrapper{
    background-color: #ffffff;
    }

    #logoWrapper{
    background-color: #ffffff;
    height:85px;
    margin-left: 13em;
    margin-right: 13em;
    }


    Any suggestions?

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: can you make header and page different widths?

    How sites work is down to the interaction of the HTML and CSS. Seeing a snippet of one along is often not enough.

    I can see that you have given your mainWrapper a width of 80% which means that there's a margin of 10% each side (probably (assuming that you have centered it, can't tell from the snippet). But you have put margins of 13em each side of the logoWrapper.

    There will be only one browser width at which 13em = 10% of the available window. I doubt this is what you really want, especially as it will chanmge slightly from browser to browser and dramatically of the vistitor changes their font size.

    Overall though to give more help on this, it would be necessary to the site.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. how can i make different emails for admin and customers?
    By shisha in forum General Questions
    Replies: 12
    Last Post: 24 Jun 2010, 08:22 AM
  2. Can you make your own Web address page or is always index?
    By volleybiggs in forum General Questions
    Replies: 0
    Last Post: 5 Sep 2008, 06:56 PM
  3. Can you change header ez page link color?
    By sfklaas in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Jun 2008, 05:08 AM
  4. Replies: 12
    Last Post: 20 Jun 2008, 04:20 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