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
sebringj#
It might be a visual/spatial disconnect because you mention you cannot intuit color contrast or distinguish fonts or failed at how design works. CSS then would have no meaning to you. Imagine asking a deaf person to describe music in notes. If it has no true meaning to you, it is nearly impossible to grasp. If this is the case, I would rely on a UI toolkit that has theme support so you can easily change between them and not care about these types of things.
companyhen#
I personally love CSS, I can do it in my sleep and enjoy it. JavaScript on the other had has always been a struggle for me, I can write code, but it hurts my brain and I'm not a natural logical thinker. I'd say CSS started clicking for me when I would play around with the Inspector with live previews. Once you learn how display (block, inline, etc.), positions (relative, absolute), margins and paddings actually work everything else is pretty simple.
arkh#
Here is a crazy trick with CSS: read the specifications and take notes.

The cascading and the different display contexts should be enough to get you through most pitfalls.

Load more comments