home

CSS: Making it Pretty

Now, my favorite part! CSS. It stands for Cascading Style Sheets. It's what we use to add colors, layout, and more to our websites. The technical term is style actually. CSS is one of those things that is extremely fun and cool, but depending on what you're doing, can turn extremely complicated fast. But it'll be ok. Let's start slow.

Anatomy of a CSS Rule

A color-coded CSS diagram. Graphic design is my passion.

Terms

What's a hex code?

A hex code is a way to represent color on the web. Every color has a corresponding hex code that is 6 characters long, and you can use these to get as granular with your colors as much as you'd like. You've probably seen this somewhere on the web before, but if not that's ok. We'll talk more about color later.

the Box Model

the box model! margin, border, padding, and content.

the Cascade

It's called Cascading Style Sheets for a reason. I'm going to throw some terms at you that may make your eyes glaze over slightly, but trust me, you'll need to know it.

I'm going to direct you to this page from Interneting is Hard, because it explains it better than I could.

the Cascade

Worried about the cascade?

If you think your styles will get messy and this feels overwhelming, I recommend just using an external stylesheet for now. That way, you know all of your CSS is in one place!

Common CSS Properties

Color

Spacing

Text

General

Remember!

If you want to learn how to use each property and what values it accepts, you can always look it up on the Mozilla Development Network.

Demo: Styling my Activity Page

Let's open up the code and now I'll do a quick demo on how I like to style my activity page.