Jump to content

Header fix


mical71

Recommended Posts

Hi,

 

I would like to ask you for your help with fixed header. I installed this plugin https://mypresta.eu/modules/front-office-features/fixed-sticky-header.html to my websites http://mmarts.cz/retroshop/ and it´s not working fluently and well on short pages like http://mmarts.cz/retroshop/napiste-nam

 

Can you help me how can I do it more like www.walmart.com ? To show top menu fluently and calm?

 

Thank you very much, best regards,

 

Michal

Link to comment
Share on other sites

When switching the header to sticky, you should also take care of the main content's offset, if not you'll end up with a jump effect like the one you have now. And regarding the contact page - it's not long enough, sticking the header shoud be turned off if doument is not long enough.

Link to comment
Share on other sites

for what puroses you want to use sticky header for page that does not have enough height to activate browser's scroll feature ? sticky header is active only when you have to scroll page, if there are no scroll - header will be normal.

 

but the key thing is "and it´s not working fluently" - lets clarify what you mean by this, from what i see fixed header works properly if page has scrolling

Link to comment
Share on other sites

Hi,

 

thank you for your comments. The problem is on these short pages http://mmarts.cz/retroshop/content/5-bezpecne-zpusoby-platbyhttp://mmarts.cz/retroshop/napiste-namhttp://mmarts.cz/retroshop/content/4-o-nas 

 

I have 13" notebook and there is scroll bar for these pages. And I can´t get to the bottom of the page (to the footer links) because it still try to show fixed menu / don´t show. Effect is that is scrolling up and down.

 

Some idea how to fix it? How can I turn it off for some pages?

 

Thanks, Michal

Link to comment
Share on other sites

Hi Michael ,

 

Thank you for your reply.  I actually replaced your code in file fixedheadr.js with this one

 

var  mn = $(".header-top");

    mns = "header-top-scrolled";

    hdr = $('header').height();

 

$(window).scroll(function() {

  if( $(this).scrollTop() > hdr ) {

    mn.addClass(mns);

  } else {

    mn.removeClass(mns);

  }

});

 

I also replaced CSS in file fixedheader.css with this one:

.header-top{

  background: #fff;

  z-index: 150;

}

 

.header-top-scrolled {

  position: fixed;

  width: 100%;

  top: 0;

  box-shadow: 0 2px 3px rgba(0,0,0,.4);

}

 

I needed my Header top to be stycky that is why I used this heard-top class.

You can see result here:

http://presta7.webbtryckeri.com/index.php

And short pages are not shaky any more, you can see it here:

http://presta7.webbtryckeri.com/index.php?controller=authentication&back=my-account

 

Thanks for this module and for button scroll to top. As you can see I have installed this one as well.

 

Regards

Zoran

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...