-1

I am using Square space right now and want to blur the section background image on my home page. The problem is 2 other images on my page are section backgrounds so they all have the same class. To my understanding, I can't directly edit the HTML code to give it an ID. So I need to somehow select the first instance of a class using purely CSS.

1 Answers1

0

You could use :first-of-type selector

.my-div:first-of-type{color:red}
<div class="my-div">One</div>
<div class="my-div">Two</div>
<div class="my-div">Three</div>
charlietfl
  • 170,828
  • 13
  • 121
  • 150