Even though it may not seem like it right now, CSS breaks down to 3 simple components:
Each area of your CSS file will be broken down into blocks that look like this:
selector {
property: value;
}
Between the curly braces, you can write many rules that apply to a single selector.
CSS files can become a bit unwieldy and without some organization files can be a bit hard to follow.
You can counteract this by organizing your blocks and adding comments.
Comments start with /*
and end with */
: anything between this will be ignored completely.
nav
would come before nav li a
)padding
might be grouped with width
while font
would be better grouped with color
)