0

Is there a way to target the <strong> in the first <div> below, but not the second? I want to style <strong> if it appears only at the very start of the line but div strong:first-child matches both:

<div><strong>Total:</strong> 12,000 and counting</div>
<div>A total of 12,000 <strong>and counting</strong></div>

I'd say it's impossible without modifying the markup?

EoghanM
  • 22,654
  • 22
  • 86
  • 115

0 Answers0