Hacker News new | ask | show | jobs
by trs8080 1641 days ago
???

.box { display: flex; align-items: center; justify-content: center; width: 500px; height: 500px; }

.box div { width: 100px; height: 100px; }

<div class="box"> <div>this is centered vertically and horizontally</div> </div>

also, using tables for layout isn't semantically correct. it's like using `map` as a for loop. also, consider folks with disabilities who rely on screen readers.