Support » Theme: Coraline » Fixed header only works on index page

  • Resolved slarus

    (@slarus)


    Hello!
    I found a code to make the header fixed and It works perfect, but the problem is that it only works on front page, at my other pages and my posts it “blocks” the scroll and I can’t do anything! But when I deactivate the “position:fixed;” line the scroll works but my header is not fixed (sticked to the top) 🙁
    Can somebody help me please?
    Thanks!

    #header {
            position: fixed;
            top: 0;
            background: rgb(255, 255, 255);
            background: rgba(255, 255, 255, 1);
            z-index: 10;
            height: 228px;
            width: 880px;
    }
    #content-box {
            margin-top: 220px;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Could you please provide a link to your site? On my test site your code works the same way on all pages and posts, as well as the front page, so I’ll need to see it in action on your site. Thanks.

    Thanks for your answer Kathryn!
    Yes of course!
    My site is: http://www.mivrastvdio.com
    I dont understand where is the error 🙁

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    To troubleshooting this, I suggest starting by temporarily commenting out everything in your child theme’s style.css file except the CSS you showed me above. If it works, then paste bits back a small bit at a time until you find the culprit.

    If you’ve also made changes to other theme files in a child theme, I’d do the same with them – remove all your child theme template files and see if the CSS works, and then add one file back at a time to find out which one is causing the conflict.

    Let me know how it goes.

    Kathryn thanks for your answer!
    I found that the problem is in the header file of the child theme that I created.
    I will try to resolve it from there!
    Thanks a lot for your attention and your good advice 🙂

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Great, glad you’re all set!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fixed header only works on index page’ is closed to new replies.