Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda