Sticky menu on pages only, not posts

Hi,

Is it possible to have the sticky menu on pages only, not posts.

Site is: https://kickstartcontent.com/

(Currently, I have it set to static but would like it sticky on just pages).

Thanks,
Sophie

Hello Sophie,

Please try to use the following CSS code.

You can add CSS code in DashboardAppearanceCustomizeAdditional CSS (WordPress 4.7 and up). Also you can add CSS code directly to style.css file of your child theme.

body.page #masthead {
    position: fixed;
}

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Hi Roman,

Thanks for your reply.

That doesn’t seem to have worked. The menu is still sticky on posts as well as pages.

Any ideas?

Thanks,
Sophie

Hello Sophie,

Did you select Static in Customize → Header area → Menu style section?

Kind Regards, Roman.

Hi Roman,

Yes, I tried it both ways, actually. It is now currently set to static and showing as static on both posts and pages.

Thanks,
Sophie

Hello Sophie,

I don’t see that code currently applied on your website.

Can you please apply it and leave here a note?

Kind Regards, Roman.

Hi Roman,

I had applied it already - you can see it on this screenshot.

https://kickstartcontent.com/wp-content/uploads/2017/05/CSS.jpg

Thanks,
Sophie

Hello Sophie,

It looks like you didn’t close the @media rule, row 75-82.

Kind Regards, Roman.

Hi Roman,

Do you mean the closing bracket on row 82?

I’m not quite sure how to fix this. I tried moving it to the start of the row, as the other closing brackets are, but it hasn’t made a difference.

Sorry, I’m useless with CSS.

I’m not sure if you’ve noticed but I also have this open query: https://athemes.com/forums/topic/footer-widgets-alignment-and-spacing/

Could the reason neither of the changes you’ve suggested are working be related?

Thanks,
Sophie

Hello Sophie,

You have opened @media rule in row 75. You should remove or close it somewhere because it prevents the code below row 75 from working.

Kind Regards, Roman.

Hi Roman,

As far as I can tell it is closed.

All I’ve done is copy and paste the code that your team has given me in this forum.

Please advise me on how to close it.

Thanks,
Sophie

Hello Sophie,

You missed one } character. Please check this topic:

Kind Regards, Roman.