Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
How to target last div item with class selector

#hello .modal .cont div[class~='imagelink']:last-of-type{
      background:red;
}
Below is the HTML I have and I want to select last occurance of div.imagelink. I tried above css but seems linke not working. 

<div id="hello">
  <p>wfwe</p>
  <div class="modal">
    <h1>veve</h1>
    <div class="cont">
      <p>wfwfw</p>
      <div class="imagelink">wfwef</div>

      <div class="imgg"></div>
      <div class="imagelink">wefewf</div>

      <div class="imgg"></div>
      <div class="imagelink"></div>
      <div class="imgg"></div>

      <div class="imagelink"><p>Select me</p></div>

      <div class="imgg"></div>

      <div class="imgg"></div>
    </div>
  </div>
</div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!