Hiding a DIV element on a specific page only
-
Hello,
I’m trying to hide a specific div element, but only on a specific page ID, and using only a line of code in the CSS stylesheet.
In my case, I want to prevent a footer section from appearing, for instance, on page id #2.
I tried the following code, but it doesn’t work:
#footer body.page-id-2 { display: none !important; }
I think I’m close:
#footer { display: none !important; }
the last code above successfully hides the div, but it’s applied everywhere. I want this to apply only to page id 2.
Can anyone guide me?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hiding a DIV element on a specific page only’ is closed to new replies.