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

adding padding in a task

http://teamtreehouse.com/library/websites/build-a-simple-website/styling-content/finishing-the-css-2

I've copied the text exactly to create padding 10px to the top and bottom and 0px to the right and left. Every time I do that and hit "check work," it gives me "bummer, now task one is no longer correct. Task one is

I check task one again without the padding and it again says it's correct and allows me to go forward to task to. I enter:

#copyright {
    border-top: 8px solid #2A0400
        padding: 10px 0px
}

with AND without putting the ; after 0px and neither allows me forward. What am I doing wrong?

[ed. note:] Added markdown to fix code formatting

7 Answers

Maybe you forgot the semicolon after your border-top rule? The following code will pass:

#copyright {
 border-top: 8px solid #2A0400; 
 padding: 10px 0px;
}

James Minner -

To add to Sam's already excellent answer, remember that a semicolon ( ; ), goes at the end of a CSS rule, it's similar to how a period does at the end of a sentence.

I want to add, the "}" is in the coding, in this post it's moved down

@James Minner

Hello, its just a general comment, **try do not add (px) for 0 values**. Its not a big problem, but more validate, and the px or any unit when it comes after 0 values it sometimes and when you use jquery animation it will make some problem with some browsers. Cheers.

As simple as that. You guys are awesome for taking the time to help! Truly appreciate it :D

It was the 0px; by the way... thought I tried that but I guess I hadn't.

@James

I mean don`t use the px with 0 values; just say : padding:0;

Its a general info. as I mentioned before, and we help each other and share what we know as possible as we can :) .