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

HELP! Code Challenge: Stage 4, Styling Content, Task 1 of 2

Hello!

I am having trouble passing this code challenge, I'm using Sublime Text 2 whilst watching the tutes and then I copy what I have coded into the Treehouse text editor (usually I don't have problems), my code works in my browser, but not for this challenge.

It says I haven't added any padding to the .btn class, when I am sure I have!

Here's my code:

body {
    font-family: 'Nunito', sans-serif;
    color: #FAF3BC;
    background: #420600 url('img/texture.jpg') repeat;
}

a {
    color: #4FB69F;
    text-decoration: none; 
}

h1 {
    font-size: 1.750em;
    letter-spacing: -1.5px;
}

h2 {
    font-size: 1.500em;
    color: #B4C34F;
}

.btn {
    color: #FAF3BC;
    background: #4FB69F url('img/texture.png') no-repeat right top;
    padding: 15px 30px;
    margin: 40px 0px;
    border-radius: 25px;
    text-transform: uppercase;
}

.btn:hover {
    background-color: #4CC4A7;
}

Hope someone can help me out! :)

5 Answers

Did it twice more...third time's always the charm isn't it!

CHALLENGE PASSED!! Danke my friend! :)

Your code works for me. Have you tried refreshing the code challenge page? I have noticed that the treehouse editor can get 'stuck' sometimes, it seems to happen if you have already clicked 'recheck work' before multiple times. But refreshing the page makes it work.

Give it a try and hopefully that will fix it!

Just refreshed the page to no avail! :(

Have you tried clearing the cache? In most browsers you can do this by pressing ctrl + f5 (on windows). Or go into the settings and look for 'clear browser data'.

This is the code I used

    body {
  font-family: 'Nunito', sans-serif;
  color: #faf3bc;
  background: #420600 url('img/texture.png') repeat;
}

a {
  color: #4fb69f;
  text-decoration: none;
}

.btn {
  color: #faf3bc;
  background: #4fb69f url('img/texture.png') no-repeat;
  border-radius: 25px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 30px;
}

No problem glad it worked and congratz! I think you probably just needed to clear the cache its a really common issue that you'll probably face again. I'd recommend you read over this guide on how to clear cache, its only short I promise! This will tell you what it is and why you need to clear it. The article is for chrome but its the same idea for all browsers.