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!

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


Bug appears when button feature added in style.css (Cupcake)

Building the Cupcake site, a bug appears on the site when I add lesson line 24 on the style.css file. It is normal until I add the background color, then after I add the button background color, the button background does as it is supposed to do, but it also adds the same change to the text in the next section, Cupcake of the Week. What am I doing wrong?

Use codepen to show us what you have done as its next to impossible to diagnose the issue without actually investigating.


7 Answers

I have never used the codepen, so I guess I'll have to study THAT before I can figure out what I did wrong Last time. My frustration does know bounds...it is Life. Ahh, the joy of the Search for Enlightenment! The Challenge of Learning! The Joy of Success! The Frustration of Errors! OK, so where do I start to learn about how to use Codepen to post it to my query?

Codepen is super simple go to the website. Then copy and paste your code into the relevant sections HTML, CSS and Java. Then click share and post the link here and then i can have a look what is wrong.

Thank you for helping...I'll attempt to follow your instructions.

I've saved it to the codepen, but I don't know how to send it to you...i copied the URL and I'm sending that, maybe it'll help, I don't know. As you can tell, I am a newbie. http://codepen.io/anon/pen/uDIEh

Yeah you did it correct. Let me have a look now and will get back to you in a minute. Hey everybody has to start somewhere :)

Right i think i found the error you see this html line startint " <p><a href="#" class="btn">Browse Our Cupcakes</p>" it is missing the closing "</a>" tag so should look like this " <p><a href="#" class="btn">Browse Our Cupcakes</a></p>"

Let me know how it goes!

Ralph Roshto

See this snippet of your code below:-

<p><a href="#" class="btn">Browse Our Cupcakes</p>

This is how it should be:-

<p><a href="#" class="btn">Browse Our Cupcakes</a></p>

You were missing the closing "a" tag. So the element wasn't closed off and effected the layout and style.

Ralph Roshto - Also toward the end of your HTML you have a lone closing div tag, so either forgot to add the opening tag or just a stray.A tip with codepen is that any errors in html elements will be white so then you can investigate why its not correct.

James Barnett
James Barnett
39,199 Points

Ralph Roshto -

Head over to codepen and create a pen then post the link back here so we can see the bigger picture, think of it as helping us help you.

Need a few pointers on how to use codepen? Check out this short how to guide on codepen

The link is above James Barnett

another attempt to help you help me... http://codepen.io/anon/share/zip/uDIEh

OK, I went back to the guide you just sent me, and saw the NEW PEN option, and saved it here... http://codepen.io/anon/pen/jzsvb

James, you know how to make a man stand up and shout, "YES!" Thanks, and I'm sure I'll be FULL of more questions. All my "friends" tell me I'm full of...well, something. Anyway, Thanks a Heap!