• tomsherlock

    (@tomsherlock)


    In WordPress 6.6.1 this css rule is ignored:

    body.page-id-84 header{

    display:none;

    }

    If I drop the css class the css rule is executed:

    body header{

    display:none;
    }

    What is a workaround in CSS to target a specific page?

    Is there a way to do this via configuration?

    Any other suggestions?

    Please advise,

    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • threadi

    (@threadi)

    Whether a CSS code works depends heavily on the theme used. A link to your page could help you to identify the problem.

    Thread Starter tomsherlock

    (@tomsherlock)

    Sorry, I thought I had included the link (it was late): SherlockProofreading.com

    I’ve tried four different themes: Variations, Twenty Twenty-Three, Twenty Twenty-Four, Gutenify Base. No change.

    I’ve also tried three different browsers: Google Chrome, Apple Safari, Firefox

    Essentially, I have a Coming Soon landing page with a nav menu that I want to hide on the landing page only. In the meantime, I’m working on the site with a functional menu on other pages: Home, About, Services, Contact. Currently, the nav menu (within the header) is successfully hidden on the landing page, but the rule doesn’t distinguish; the nav menu is unintentionally hidden on all page.

    The non-functioning, page-specific CSS rule is commented out since it doesn’t work.

    threadi

    (@threadi)

    I don’t see why the rules on the site shouldn’t apply. It just worked during a test.

    However, I wonder why you are going to all this trouble. There are also plugins for Coming Soon issues that do this for you: https://www.ads-software.com/plugins/tags/coming-soon/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.