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

Font-size is not changing for the gallery paragraphs

in the workspace my font-size element keeps indenting and becoming blue instead of the usual orange. The result is the same as the video instead the font remains the same

gallery li a p {

margin: 0; padding: 5% font-size: 0.75em; color: #bdc3c7;

4 Answers

Steven Parker
Steven Parker
243,318 Points

It might be caused by some code other than this small snippet. For one thing, color: #bdc3c7; is neither orange nor blue, it's a light steely-gray.

Perhaps you should make a snapshot of your workspace and post the link to it here.

Steven is right, your issue may be casued by another rule you have applied in CSS to either an li or an a tag.

As they all said, this could be the case and to test that you can use !important, next the css you actually want. So it would look something like...

<style>
.gallery li a p {
   font-size: 30px !important;
}
</style>

Now I was told not to get in the habit of using !important, because it's global and that might cause issues with naming down the road for larger projects. However, it's very useful for testing.

Hope this helps.

Steven Parker
Steven Parker
243,318 Points

Use of !important is nearly always a band-aid for something that wasn't correctly designed to begin with.

Ya, when I'm working with Foundation or WordPress themes, I use it to override certain features or to troubleshoot.