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

Daniel walls
Daniel walls
2,174 Points

hello i cant seem to get my <h2>background </h2> element centered on my class card.

I am currently studying the select a style by class portion of Html and Css. i believe my css is correct

.card-title { text-align: center; }

but when i save this in my work space and refresh in my project page , my h2 element does not center

2 Answers

<h2 class="card-title">background </h2>
.card-title {
   text-align: center;
}
Daniel walls
Daniel walls
2,174 Points

thank you!

that really helped. in my index.html it looked like this

<h2>background</h2>

You are welcome.

Keep it up :))