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
  • 25,161
  • 23
  • 90
  • 123

0 Answers0