from Hacker News

Ask HN: How to Get Good at CSS?

by JSLegendDev on 1/23/25, 1:25 PM with 2 comments

I know the basics, can usually get the design I want after a lot of trial and error but it doesn't feel like I truly master CSS. I always have to google what I want to do since I barely remember certain rules.

Any tips to get better at CSS or resource you would recommend?

  • by culi on 1/24/25, 7:02 PM

    CSS is not something that you can intuit so it only really comes with practice. I used to take on a lot of little projects (you might have to abandon the "stop starting, start finishing mantra") which I found to be a really effective way to level up quickly. One really effective exercise I've done is to take an existing website and try to recreate it from a screenshot alone. When you get stuck you can try to peak at the source code to see how it was done. Here's a small collection of some good candidate sites for this exercise:

    - https://special.fish/

    - https://pirate.care/

    - https://craigslist.org

    - https://fillip.ca/

    - https://html.energy/

    - https://gossipsweb.net/

    - https://brutalistwebsites.com/

    - https://theface.com/

  • by barrettondricka on 1/23/25, 2:12 PM

    1. Don't. Get better at googling instead

    2. CSSTricks

    3. Learn to read MDN docs.

    4. Flexbox froggy and grid garden

    5. Hyperplexed (older videos)

    I warn you, that "studying" CSS is a pointless endeavor. Your knowledge should be "tools that exist" without knowing the exact syntax.

    Also, "No JS". Make your stuff without JavaScript. It forces you to use every quirck in HTML and CSS to make stuff work.