1 year ago

#382463

test-img

biri

CSS the last of the same p tags in a row?

<div class="content" v-html="data">
  <h2>TEST</h2>
  <p>Test<p/>
  <p>Test<p/>
  <p>Test<p/> ------ this
  <h2>TEST</h2>
  <p>Test<p/> ------ this
  <h3>TEST</h3>
  <h4>TEST</h4>
  <p>Test<p/>
  <p>Test<p/> ------ this
  <h2>TEST</h2>
</div>

p+p:last-child {
  color: red;
  margin-bottom: 20px;
}

I did this but it doesn't work.

I showed in code what I want to access

NOTE: Data is coming dynamically i am printing it with innerHtml

html

css

selector

0 Answers

Your Answer

Accepted video resources