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 How to Make a Website CSS: Cascading Style Sheets Use ID Selectors

Jonny Allmond
Jonny Allmond
580 Points

None of the editing that I'm doing in main.css is showing in my preview.

I've tried changing my background color and it stays white and then I tried changing the text decoration and it was the same. It's like nothing that I'm doing in main is working and I've checked it numerous times. I have noticed that there's an orange shade around the { brackets and I can't get that to go away.

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

Hi Jonny! Can you post a copy of your code, both the html and the css. You can post this by including 3 backticks on the line before the code and 3 backticks on the line after. You can look at the Markdown Cheatsheet below the answer/comment box to see an example of this. Thanks!

2 Answers

Michael Zimmermann
Michael Zimmermann
1,332 Points

Did you make sure to link your main.css in your index.html?

It should look like this:

    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">
Jessica Betts
Jessica Betts
12,662 Points

I had the same problem for a while. As Michael said, the first thing to check is that all your files are linked. At one point I had put stylesheets, instead of stylesheet, and that was all it took to break the link between my files. Then, I had a moment where I realized that I hadn't named my css file main, I'd used Main. It's all in the details here. Second, if your links are clean, us the developer tools in your preview. If you click on the body section of the html tab (on the left), then take a peak at the css linked to it (on the right), you'll see how and where your css is affecting your html. Due to the complexities of id and class selectors, often times the code you write later on will be overridden by the code you wrote before, or vise versa. You can see this happening in the developer's tools when a bit of css is slashed through with a line. If you post your html and css it will be easier to for us to find the bug, if you're still having trouble. Let us know how it goes :)