Home Forums Plugins Notice Bar Pro Custom CSS active site wide when notice enabled, or disabled, for specific page

This topic contains 1 reply, has 2 voices, and was last updated by  wensolutions 2 weeks, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #105339

    Rick D’Haene
    Participant

    I have added the following custom CSS to the Custom CSS section of the Display tab: body { margin-top: 36px; }

    Adding this code pushes the page’s content down allowing the notice to display above, instead of on top of, the content in the header. The problem I’m seeing is that this custom CSS is added site wide, not just for the page I have selected / activated the notice on. Further, when the notice itself is disabled this CSS is still loading site wide. So, even with the notice disabled I’d have to remove the custom CSS so that it doesn’t impact the entire website.

    Can you tell me why the custom CSS is loading on every page of the website even though I have the notice set to display on a single page, and even when the notice in question is disabled? It seems to me that the custom CSS for the specific notice should only fire on pages where the notice is set to display, and only if the notice is not disabled.

    #105369

    wensolutions
    Keymaster

    Hello @bellinghamp,

    It is because you have added the general CSS targeting the general class which will affect all the pages.

    So you need to use the class from the notice bar and use the page ID so that it will only affect your desired place.

    Also, can you please provide your site URL so that we can inspect further and help you?

    Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.