In my application, I need to remove the data that is inside the div element and the paragraph element that is the div element The child is also there.
The snippet looks like
& lt; Div class = "hrt" & gt; This is Div text & lt; P & gt; This paragraph text is & lt; / P & gt; & Lt; / Div & gt;
Through the CSS selector, I want to withdraw the Div text: In the above case, I would like my solution: This is dev text
You can not target text nodes with CSS You should wrap them with an element (period or whatever).
If you can not modify your HTML content, then you will need some JS.
Leave a comment if you need help getting it done with JS.
No comments:
Post a Comment