Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website Adding Pages to a Website Review: Adding Pages to a Website

How come when you want to add 30px padding to the left only you put {0 0 0 30%}

I though it went up, left, bottom, right? Should it not be {0 30% 0 0}

2 Answers

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

In CSS, padding starts at the top and goes clockwise. There are various shorthand ways of inputting it, but the only way to target only the left of an element is by declaring four values with just padding and putting three zeroes and a value in the fourth position (like this: 0 0 0 30px), or by using padding-left with a single value.

Biwash Lama
Biwash Lama
13,772 Points

Its always clock wise direction top, right, bottom, left.