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

224
Views
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
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!