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

225
Visualizações
CSS Columns: box-shadow is rendered faulty on Google Chrome (Masonry Layout)

I want to create a masonry layout with CSS Columns. Each item has a box-shadow and a random height (in the following CodePen I simulated this with exact heights).

And there's the problem: The box-shadows are appended to the wrong column if the elements use different heights. I would even say that this is a rendering issue in Google Chrome?

Do you have any idea, how to solve this issue in context of the idea to have a masonry layout?

https://codepen.io/malte94/pen/yLomKJe

enter image description here

.box {
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  min-height: 200px;
  margin: 10px;
}

.columns {
  display: block;
  column-count: 3;
  page-break-inside: avoid;
  break-inside: avoid;
  overflow: hidden;
}

.columns * {
  display: block;
  max-width: 100%;
  page-break-inside: avoid;
  break-inside: avoid;
  overflow: hidden;
  margin: 10px;
}
<div class="columns">
  <div class="box" style="height: 200px;"> Hey there! </div>
  <div class="box" style="height: 400px;"> Hey there! </div>
  <div class="box" style="height: 500px;"> Hey there! I'm broken </div>
  <div class="box" style="height: 100px;"> Hey there! </div>
  <div class="box" style="height: 50px;"> Hey there! </div>
  <div class="box" style="height: 250px;"> Hey there! </div>
</div>

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