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
bobbydreamer#
CSS is hard. I like Colors but I find it really hard coding hand picking Colors and designing this game exactly the way I want. Sometimes the design will look like not the way I imagined and since I had put too much time, I have no choice other than accept it. Bootstrap 4 & mdbootstrap are great help but eventually prior pains of learning css helped to change or modify bootstraps. Now just looking for tools that would reduce the size of css files which I am using and remove the css content which I am not using. That kind of app will improve load time.
madiathomas#
First learn design, then learn the tools(CSS). Preferably using a book that has nothing to do with web design. Problem with most developers is that we only learn the tool and forget to learn design. To understand how to properly mix colours, you need to study colour theory. To understand how to use the right fonts, spacing etc, you need to study typography. Also learn about image types. I don't understand why most web design books want to dive straight into CSS before design.

After that, you need hours and hours of practice in order to be good at it. We learn by doing.

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

Can't help on the fonts thing here, but for colors, there are a couple of things to consider. You can use color wheels of different kinds to find matching colors and harmonious color palettes to create/use in a color scheme. There are many online sites that provide this for free. While deciding on colors, you should also consider accessibility from the color blindness point of view and the contrast point of view.

alanbernstein#
I can relate to OP's lack of appreciation for fonts and color palettes - not 100%, but I get it. Color wheel tools are useful, and their results do look notably better to me, but using those may not improve your understanding of the color relationships much. But then, maybe you don't need to understand.
scns#
Colorhexa.com shows you how the color you chose is perceived by people with color blindness.
fulltrottle1 reply#
Read the full CSS spec:

https://www.w3.org/TR/CSS22/
https://www.w3.org/TR/CSS22/sample.html
And the W3C flexbox and grid specs
Recently I read the full CSS spec front-to-back in detail, and I can say that it was so totally worth it. Tutorials don't cover a lot about CSS. Once you read it you'll know things about CSS that most devs think is a mystery

audience_mem#
Some might consider this radical, but if one considers how long CSS will be around, and intends to live in the web development world, it certainly would pay off. There's nothing like the feeling of true understanding.

Not the kind of reading material most people would turn to, admittedly. I've recently found this:
http://book.mixu.net/css/
It feels like a good balance between quotes straight from the spec, and explanation from the author.

Load more comments