Lurker News
Hey HN,

I'm a seasoned backend developer and systems administrator, with over 10 years of full-time programming experience. I've worked with anything from Assembly, C, Rust all the way to Python, Erlang, Elixir, PHP, Haskell, Lisp, Clojure.
When it comes to frontend, I have used React, Vue.js, ReasonML, Clojurescript and Elm extensively, and I know my way around web technologies in general. However, ever since I first started programming, I was NEVER able to get the gist behind CSS. I can't center my divs properly. I can't say "hey, CSS, this is the parent div, and all child divs must obey its size". I can't do anything basic on CSS without turning for help.
Incidentally, but very likely related, I always failed to have any glimpse into how design works. I have no idea which colors "go" with which ones, and pretty much all fonts look like the same for me.
I'd like to know the experience from fellow programmers. Is CSS an "art" thing? Is it common for other developers to have issues with it, or is it just me? Is there any material out there that made CSS "click" for you?

Comments (340) 150 threads

Earlier comments
nicoburns#
The problem with CSS is that there is some (completely unintuitive when you're learning) tricks to make it all work. But there only say 5-10 important ones, so once you've learnt them it gets a lot easier.

I'd recommend http://learnlayout.com for learning some of these tricks.

scns#
One guy once wrote here on HN that he does not have an intuitive feel for CSS even after 20 years working with it. Seems we just have to memorize all the rules.

I think the book "Learn CSS the pedantic way" is a great resource:
http://book.mixu.net/css/

ASalazarMX#
> I have no idea which colors "go" with which ones, and pretty much all fonts look like the same for me.

Before going into web development, I wondered why some people were so picky about fonts when they all looked similar. I'm a little ashamed to admit that after 5 years, they still look somewhat similar.

Antonio123123#
Think this way: You html is a tree of tags. You have to layout this tree.

Each tag is a box that can contain other boxes. Learn about the box model to understand the properties of a box.
How do you display the boxes inside another box? Learn about the display property.
How do you position the box inside another one? Learn about the position property.

Load more comments