Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda