I would like to know how to display an element contained in a parent element that has the characteristics of "display: none". But do not leave other children under this parent. Here is a simple example:
<div id="parent"> <p id="item1">Item should show</p> <p id="item2">Item should show</p> <p id="item3">Item should not show</p> <div> <style> #parent {display: none;} #item3 {display: block !important;} </style>
So, in this example, I want # item3 to be displayed and the rest of #parent and his children not to be displayed. I know that there are workarounds that involve changing the CSS of each individual element, but I work with dozens of points here and wondered if this is possible, even through JS. Thanks in advance.
source share