Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Background Color, Margin, and Padding1:19 with Joy Kesten
Explore some styling techniques in CSS, including the background color, margin, and padding.
In this video we're gonna talk about how to set the background and body styling.
Let's get started.
The first thing you find here on our style sheet is the background color, and when
you hover over this hexidecimal number, it matches the background color to our page.
You should change this color to something you like.
So I've linked a few pages about hexadecimal colors in the teacher's notes.
Next you have the body styling, even though there's no text on our webpage,
the button images are all located inside the body.
So we have to make sure they follow the styling we want.
Here I've used two numbers to describe the margin.
Margin and padding works in directions, starting at the top and going clockwise.
Top, right, bottom, and left.
However, in our body styling.
We only use two values to describe the margin, zero and auto.
This means the top and
bottom will have the same value, and the left and right will have the same value.
The zero says there's zero top and bottom margin, and
auto tells the browser to automatically determine the left and right margin.
And set them equal.
That was a lot of information.
Stay tuned for a code challenge on how to add a background color, margin, and
padding in your CSS.
You need to sign up for Treehouse in order to download course files.Sign up