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 trialAlexis Hughes
418 PointsCannot get text to center?
I have tried everything I could think of and am unable to get the text to center here. I followed the tutorial closely and made sure my changes were saved, and still my "Background" or "card-title" class will not center.
Here is a screenshot of my code: https://w.trhou.se/8spu4883lu
Thank you in advance!
1 Answer
Cameron Childres
11,820 PointsHi Alexis,
It looks like the rule before .card-title
doesn't have a closing curly brace:
h3 {
color: purple;
letter-spacing: 0.001px;
.card-title {
text-align: center;
}
If you close out the h3
rule then your .card-title
rule will be valid and your text should become centered:
h3 {
color: purple;
letter-spacing: 0.001px;
}
.card-title {
text-align: center;
}
Hope this helps! Let me know if you have any questions.