Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1

    Default (WD7Pro) Full wide header & footer in combination with sticky footer [JS question]

    Hello,

    may be somebody can help me with my problem:

    I did made a website with header and footer graphic in full-wide with the help of the "overflow tweak" which contains this code:

    -----------------

    <style type="text/css">
    html {
    overflow-x:hidden; overflow-y:scroll;
    }
    </style>

    -------------------

    I now did want change that (full wide) footer stays "sticky" on lower end of browser window with the help of the tweak "sticky footer" from the WD7 tweak set.

    So I did create the additional layers "footer end" and "footer begin" put there both placeholders with code and then made additional layer "footer" and did put there the footer.

    But now as a result the "sticky footer" effect works perfect (ok) but now my headers and footer are no more longer full wide. Instead of this they are now cut to page wide. (Hint: The option "cut to page wide" is disabled in website options)

    I think it is something inside the "sticky footer" placeholder on the "footer begin" layer which contains following code:

    -----------

    </div>
    <script type="text/javascript">
    var my_oldres=window.onresize;
    window.onresize=my_res;
    function my_res(e)
    {
    if(my_oldres)my_oldres(e);
    var dh=document.documentElement.clientHeight;
    var xr_xri=document.getElementById("xr_xri");
    var ph=parseInt(xr_xri.style.height);
    var h=dh;
    if(dh>ph)my_footer.style.top=(dh-ph)+'px';else{my_footer.style.top='0px';h=ph;};
    xr_xri.style.clip='rect(0px, '+parseInt(xr_xri.style.width)+'px, '+h+'px, 0px)';
    if(my_background){h-=parseInt(my_background.style.top);my_background.s tyle.height=h+'px';};
    };
    </script>
    <div id='my_footer' style="top:0px;left:0px;position:absolute;">
    <script type="text/javascript">
    var my_footer=document.getElementById('my_footer');
    var my_background=document.getElementById('my_backgrou nd');
    my_footer.style.width=parseInt(xr_xr.style.width)+ 'px';
    my_res();</script>
    <div>

    -----------------

    My JS-knowleadge is not so good, but I think it has to do something with the code above.

    Can anybody help me to change that my header/footer again is displayed in full wide.

    Thanks

    Tom

  2. #2
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: (WD7Pro) Full wide header & footer in combination with sticky footer [JS question

    If you have page clipping disabled, then you can remove following line from the footer begin code: xr_xri.style.clip='rect(0px, '+parseInt(xr_xri.style.width)+'px, '+h+'px, 0px)';
    So the code would look like this:

    </div>
    <script type="text/javascript">
    var my_oldres=window.onresize;
    window.onresize=my_res;
    function my_res(e)
    {
    if(my_oldres)my_oldres(e);
    var dh=document.documentElement.clientHeight;
    var xr_xri=document.getElementById("xr_xri");
    var ph=parseInt(xr_xri.style.height);
    var h=dh;
    if(dh>ph)my_footer.style.top=(dh-ph)+'px';else{my_footer.style.top='0px';h=ph;};
    if(my_background){h-=parseInt(my_background.style.top);my_background.s tyle.height=h+'px';};
    };
    </script>
    <div id='my_footer' style="top:0px;left:0px;position:absolute;">
    <script type="text/javascript">
    var my_footer=document.getElementById('my_footer');
    var my_background=document.getElementById('my_backgrou nd');
    my_footer.style.width=parseInt(xr_xr.style.width)+ 'px';
    my_res();</script>
    <div>
    John.

  3. #3

    Default Re: (WD7Pro) Full wide header & footer in combination with sticky footer [JS question

    Hello,

    many thanks !!! Your solution did work great for me.

    Tom

  4. #4
    Join Date
    Feb 2012
    Posts
    1

    Default Re: (WD7Pro) Full wide header & footer in combination with sticky footer [JS question

    hi , i am a bigginer, can u help me ?? can u make xara webdesign file for learn me ? a simple page with that code,plz thank you .

 

 

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
  •