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) Adding a New Web Page Write the CSS

Can't get any of my css class rules to work? They worked fine in previous videos and everything else is working fine

I can't get any of my rules for the image or the styling to work. I've checked the syntax endlessly but no luck.

".main-image { border: red solid 15px; border-radius: 50%; }" nothing works! :(

2 Answers

I just moved the class rules to the top of the css page and they were applied? it's weird, I didn't alter the text for either class rule but both of them worked when moved to the top.

Tobias Graefe
Tobias Graefe
11,934 Points

Maybe you have to make sure, that the img element has the right class in your html. Check for typos too ;-)

Mohammad Rashed
Mohammad Rashed
5,589 Points

thank you bro Tobias Graefe