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

899
Views
css :first-visible-child & :last-visible-child

i'm making a container with children. I need the first visible child & last visible child have rounded corners.

My approach is using :first-child & :last-child and it works fine. But if one/some children have .hidden, the layout seem broken. So I need a something similar to :first-visible-child & :last-visible-child, of course that selector doesn't exist. I need a trick/hack to archive the similar result.

Note: I cannot apply border-radius on the container with overflow: hidden because the child's box-shadow will be clipped out and the children might have a shake transfom effect and I don't want become clipped out.

Note: a javascript solution are welcome. Maybe using VisibilityObserver() 🤣

Here the illustration: enter image description here

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!