-1

I have a page that displays all posts that have general stack of nested divs (header-div, footer-div, etc.) for each, however, for a specific post I'd like to hide the footer-div. Each post has an id, and header-div and footer-div are class names.

For example, if I want to hide the footer-div for div id=123, I tried

#div123 .footer-div {
    display: none;
}

It doesn't seem to work.

Doing this code however will hide all footer-divs which I don't want.

.footer-div {
    display: none;
}

How does one do that? Is that even possible? Your help is appreciated.

Humble Val
  • 379
  • 2
  • 8
  • 17

1 Answers1

1

if your class and ID same level then remove space like

#div123.footer-div {
    display: none;
}
Lalji Tadhani
  • 14,041
  • 3
  • 23
  • 40