'How do I hide content on specific page using CSS

I need to hide a post widget, below css isn't working??

body .postid-6074 .widget_its-single- 
post { 
display: none; 
}


Solution 1:[1]

you can add a class in the body tag that represents that page

body.page-name .postid-6074 .widget_its-single- 
post { 
display: none; 
}

like this, It will solve your problem

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aman khan