Hacker News new | past | comments | ask | show | jobs | submit login

FYI: It took me an embarrassingly long time to realize that vertical margins overlap to the largest value. So doing p { padding: 1rem 0; } will only separate paragraphs by 1rem, not 2rem as you might think if you add both top and bottom margins. However, there are rules, so throw them into a display: flex and suddenly all your paragraphs have 2rem in between.

CSS is fun.

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Mod...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: