CSS can be hard to grasp when you're starting out. It can seem like magic wizardry and you can very easily find yourself playing whack-a-mole adj

What I Wish I Knew About CSS When Starting Out As A Frontender

submited by
Style Pass
2021-07-26 04:30:06

CSS can be hard to grasp when you're starting out. It can seem like magic wizardry and you can very easily find yourself playing whack-a-mole adjusting one property only to have something else break. It is frustrating, and that was my experience for quite a long time before things suddenly seemed to "click".

Reflecting back on this time, I think there are a few key concepts that were vital to things finally all making sense and fitting together. These were:

A key way I think about building visual UI components is that basically everything can be broken down into a bunch of rectangles on a page. It can be overwhelming to consider all aspects of a page at once, so break things down mentally into a series of rectangular components and ignore everything that doesn't matter for the piece that you're working on at that point.

When you consider the size of an element (i.e. its height and width ), there are two different models by which to measure this and you can adjust this with the box-sizing property.

Leave a Comment