Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Omar Elfishawi
Omar Elfishawi
4,060 Points

when i .card-title { text-align: center;} I do get alignment, but text goes out of the white background box

Hope you get what i mean

Robert Leonardi
Robert Leonardi
17,151 Points

can you copy paste your html & css code here

1 Answer

Aaron McClannon
Aaron McClannon
528 Points

Could be any number of things. For starters, do you mean the word "Background" itself or the entirety of the list below? If it's the title AND the text, you may have inadvertently applied the class to another tag. If the word background is going out of the border there could be additional spacing somewhere around the title itself pushing the words in any direction. You might want to post some of your coding snippets from the index and the css, then we can mimic it and troubleshoot from there.