Selection after the tag
Hi everyone,
I have this HTML:
I can't touch the HTML just the CSS, I want to format the two colon after the </em>.
Thamks
9 Replies
you can't, not without also formatting the " value" bit
ðŸ˜
AS Jochem says, you can't format them without formatting the "value". (unless you use JS of course)
However you could add a pseudo element to hide them and add your own content.
Something like this might work. It depends on exactly what it is you want to do.
that's a good call
I use exactly this previously, but the background changing now many times (sometimes blue, sometimes green, etc.), so it's not working properly.
Change bg to inherit ?
maybe something like this
https://codepen.io/MarkBoots/pen/OJGEvKG
Interesting idea, especially when the text more than 1 line long.
If the paragraph don't have background the emphesise don't inherit the background and I don't know what colour I get under the paragraph.