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

189
Views
How to prevent css grid elements from making a black line when overflowed from the container?

I'm trying to create a semicircle as a container of a grid having a lot of elements.

.circle {
  /* this is for sqaures */
  display: grid;
  grid-template-columns: repeat(auto-fit, 25px);
  grid-template-rows: repeat(auto-fit, 25px);
  /* overflow: hidden; */
  height: 40vh;
  width: 80vh;
  background-color: white;
  margin: 0px auto;
  margin-top: 10vh;
  border-radius: 40vh 40vh 0px 0px;
}

.squares {
  border: 1px solid black;
}

image

But when the grid elements overflow the semicircle which is its container then they make a black line in the bottom. How to prevent it and make the grid continue in the vertical direction.

Also, I need the boxes to be square only and the width of the grid should be as it is but height may vary.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Just add the following to the .circle selector:

  grid-auto-flow: row;
  grid-auto-rows: 25px;

You can also check it here: https://codepen.io/serazoltan/pen/bGYRqjg

about 4 years ago · Juan Pablo Isaza Report
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!