title: How to limit element heights to specific values ("stepped") based on content
body: <p>Is there any way to achieve, I can't describe it better, "step-based heights" on a div? I made a little <a href="https://jsfiddle.net/rnjetmgo/" rel="nofollow noreferrer">fiddle</a> to display what I have. </p>
  
  <p>My target is now, that every box has a height that's a multiple of 400px. So if a box with <code>height: auto;</code> would be 345px, it should be 400px, if it's between 400 and 800px it should be 800px and so on. Unfortunately I haven't found anything useful to achieve this. Any ideas?</p>