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

Wendy Enos
Wendy Enos
1,631 Points

The border element in CSS is not working, tried every variation of ways to list color px and solid, still nothing.

Within the Introduction to HTML and CSS course, the border element does not work as demonstrated in the "Select and Style by Class" lesson. Tried a couple of different variations in the order of the attributes you have to list, none of them worked. Double checked the punctuation and still none of them work. Rewound video in order to review the code used in it that apparently worked, making sure the location of the code was correct and etc. Looks like I did everything right but there's no visible effect on the sample page. Not sure what I'm doing wrong at this point, anyone?

Flor Antara
Flor Antara
12,372 Points

Hi Wendy,

Thanks for the context description. Can you share your code? (Make sure it's indented 4 spaces so it's formatted as a code block)

2 Answers

Sarah Linder
Sarah Linder
470 Points

Hi Wendy,

I had the exact same problem. Any ideas? This is the snapshot from my workspace...per Flor Antara's request in response. https://w.trhou.se/szeckbqlg6

Wendy Enos
Wendy Enos
1,631 Points

Sarah Linder In my case the problem was in the HTML file. The name of the class didn't match EXACTLY with the punctuation and everything in the CSS file. So for example I had: HTML: (h2 class="card title")Background(/h2) CSS: .card-title { }

It looks like in yours you have it listed as (class="card") but then you used the recommended ".card-title" in the CSS end of things so it basically just gets confused and ignores what you are trying to do. Hope that helps. It was a silly mistake on my part. On yours it looks like you are improvising your own class titles for everything in the html side, which is cool, but can get confusing when you are also following along with the lessons for the css. :)