Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderThe mere fact that a site like this can exist and not be a joke is proof that CSS is still badly broken. I should be able to center things by writing: foo { align: center; valign: center; }
Centering in CSS is "solved" problem if your "worst" browser to support is IE11. Flexbox does the job there. However, there are still couple of common tasks that are pain/hard/impossible to do with just CSS. Recently I learned that after all this years you still need to use JS to get css animation for dynamic height ("height:auto") of elements. And there is no progress in fixing it at CSS standard level. It's just sad... https://github.com/w3c/csswg-drafts/issues/626…
Can someone explain to me what is this for if selecting 4 x unknown in all questions leads to this? <div style="margin-left:auto;margin-right:auto;"> (DIV) <div style="text-align:center;">Text Content</div> (TEXT) If this is supposed to work, then by reduction, having more information about height/width is unnecessary for both browser and CSS programmer. Why not just always use those two forms?
Just found previous discussion from 2015: https://news.ycombinator.com/item?id=9405284 Source code: https://github.com/oliverzheng/howtocenterincss
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 3
- Total points
- 1340
- Total comments
- 398
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2015-04-13 | Howtocenterincss.com | ionicabizau | 1 | 0 |
| 2015-04-19 | How to Center in CSSFirst breakout · Best thread | plurby | 1036 | 289 |
| 2016-05-14 | How to Center in CSS | vdfs | 135 | 39 |
| 2016-08-04 | How to Center in CSS | AdamFernandez | 1 | 0 |
| 2016-12-22 | How to Center in CSS – Online tool to generate code for every situation | vanni | 6 | 1 |
| 2020-05-19 | How to Center in CSS (2015)Hall induction · Latest 20+ point return | HeinZawHtet | 161 | 69 |
