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

HTML Introduction to HTML and CSS (2016) Make It Beautiful With CSS Select and Style by Class

Class not working

in HTML <h2 class="card-title">Background</h2>

in CSS .card-title { text-align: center; border: solid black 3px; }

3 Answers

Raulis Pranckevicius
Raulis Pranckevicius
1,894 Points

Try adding a simple property like color: blue; just to check if there's a problem. If it works and the color changes then it's all good.

this worked. for some reason, I have to save multiple times after a change is made

Raulis Pranckevicius
Raulis Pranckevicius
1,894 Points

Could you please show me your html and css codes and I'm 100% sure that I will be able to tell you where's the problem. Thanks

same problem for me....

in HTML <h2 class="card-title">Background</h2>

in CSS

.card-title { text-align: center; } update* I added, border: blue; and it did the text-align, but no border or blue color.

my class is still not working

bugra eskin
bugra eskin
532 Points

Let me see your code i think i can help you :)