0

I'm trying to style a preceding element in an html email. Since Outlook doesn't support css classes I'm trying to do this in element markup, but it's not working. Is it possible to use a before pseudo element in css that's an element's markup?

<html>
<head>
<title>Test before</title>
</head>
<body>
<div>I wanna be red</div>
<div style="before:: color:red">I'm not red</div>
<div>I'm just hanging out</div>
<div style="color:red">I'm red</div>
</body>
</html>
j08691
  • 204,283
  • 31
  • 260
  • 272
Eric
  • 2,861
  • 6
  • 28
  • 59
  • I think it is [::before](https://developer.mozilla.org/en-US/docs/Web/CSS/::before), and it is a selector, which you cannot use in the style attribute of an element. It just doesn't make sense. – KIKO Software Jul 25 '23 at 20:07
  • That's not what before does. – Paulie_D Jul 25 '23 at 23:16

0 Answers0