Things I Wish I’d Known About CSS

Shared by

Some useful things to understand before starting out with CSS. By Dave Smyth.

If you’re new to CSS or a designer diving into web design, check out this article by Dave Smyth, Things I Wish I’d Known About CSS.

Here’s a quick peek:

  • Block, inline and inline-block
  • Images are inline
  • How height and width are calculated
  • Padding & margin aren’t the same
  • Margins collapse
  • Browsers have a default stylesheet
  • Use relative units everywhere
  • ::before and ::after need content
  • The ch unit
  • Normal flow
  • Styling :focus states
  • :nth-child()

Join the conversation.

Your email address will not be published. Required fields are marked *

All comments posted on 'Things I Wish I’d Known About CSS' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.

You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.

Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.