3 ms·
When I was struggling with CSS at my first job (2011), the thing that made it click for me was learning the significance of the `display` property and its possi
by roryokane 8y ago
When I was struggling with CSS at my first job (2011), the thing that made it click for me was learning the significance of the `display` property and its possible values. After I learned that each `display` value causes the element to be rendered in a certain way, and that some CSS properties were only useful for certain `display` values, it became much easier to predict how the layout would look and to organize the CSS properties in my head.
For example, it cleared up a lot of questions when I learned that `display: block` elements naturally expand to the greatest width they can while matching the height of their contents.
Also, the Mac app CSSEdit (now folded into Espresso; https://espressoapp.com/ https://espressoapp.com/) helped me learn the various CSS properties thanks to its GUI interface that listed properties by category, such as Text, Decoration, and Layout. It had icons for each possible value of each property that made it easy to remember what values each property supported. A useful feature of the app was letting me load an arbitrary web page and edit its styles with its GUI editor – I could see which properties were more often useful and how switching the between the possible values would change the look.