Linda Capellini Linda Capellini - 7 months ago 14
Javascript Question

position fixed header not working on my website

This my website https://bed-sheet-2.myshopify.com/ ,Added fixed position header css

.site-header{z-index:110;position:fixed;width:100%;left:0;}


It's not working on my website, How solve this problem. I search across stackoverflow, no solve.

Answer

Try this: .site-header{z-index:110;position:fixed;top:0px;left:0px;width:100%;} You need to add the px and a top value.