Create fixed header in wordpress

1.5k Views Asked by At

I have a woocommerce shop setup using the retailer theme. I am trying to create a fixed header and make it so only the product area scrolls. I have everything fixed so far except for the header. I have attached a .gif for an example of the scroll.

GIF Scroll: http://i59.tinypic.com/dxnuyr.jpg [Enlarge in Tinpic to see animation]

Website: http://museiam.ca/product-category/men/

Any input is appreciated. Thanks!

3

There are 3 best solutions below

1
On BEST ANSWER

Use this css lines

.container_12{margin-top: 188px;}
.menu_centered_style, .gbtr_tools_wrapper{
  position: fixed;
  width: 100%;
  z-index: 999;
}
.menu_centered_style{
  top: 62px;
}
.gbtr_tools_wrapper{
  top: 0;
}
3
On

CSS for the header should be

.header-class-name{
    position: fixed;
    top:0;
}
0
On

You can use bootstrap 3 for making header responsive as well static and can be keep at top while scrolling the page.

bootstrap will take care of responsive design as well.