AlgernonWasp (IGN: AlgernonWasp)
AlgernonWasp (IGN: AlgernonWasp)
KPCKevin Powell - Community
Created by AlgernonWasp (IGN: AlgernonWasp) on 1/5/2024 in #front-end
How to only target text content of element?
I have a div that contains a number of spans as its children and also a bit of text. The text is not surrounded by any tags, something which I cannot change. How can I target (i.e. style) only the text contents of the div, but leave any children of the div untouched? (I hope I'm not overlooking something very obvious here...)
7 replies