How to assign a css style only to one element, which is after a certain class?

Is the HTML code:

<div class="services-title">First block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>

<div class="services-title">First block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>

<div class="services-title">First block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>
<div class="price-table-row">Another block</div>


How to write ccs styles for the following<div class="price-table-row">Another block</div>that immediately follow <div class="services-title">First block</div>? The second, third, fourth <div class="price-table-row"> should not have added styles.

Unfortunately, to change the HTML structure is not possible.
April 3rd 20 at 18:49
2 answers
April 3rd 20 at 18:51
Solution
You are absolutely right. Thank you - Aleen.Kunde commented on April 3rd 20 at 18:54
April 3rd 20 at 18:53
:first-child
Changed the question... View, please - Aleen.Kunde commented on April 3rd 20 at 18:56
The pseudo-class :first-child applies styling to the first child of its parent.
So here it will not help - gino_Russel commented on April 3rd 20 at 18:59

Find more questions by tags CSS