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 trialDaryl Stamps
1,049 PointsTrouble changing the background color with my main.css workspace page
When I try to change the background color of my webpage, when following along with Nick, my page does not change. I have checked my main.css and index.html files multiple times and cannot seem to find any errors.
6 Answers
Sau Ting K
11,091 PointsDid you copy and pasted the code you gave? Because if you did, you spelled stylesheet as "sylesheet".
Kate Hoferkamp
5,205 PointsCan you post your css? Also, are you sure that the css is linked to your html page properly?
Joe Dayvie
11,956 Pointscss.main - Do you mean the main.css? Make sure the .css is at the end of the file you created/linked. Additionally, make sure your quotes are the same on both sides and that you included the rel="stylesheet" aspect.
Daryl Stamps
1,049 Pointsthis is my index.html code:
<!DOCTYPE html>
<html>
<head>
<meta charset="uf-8">
<title>Daryl Stamps | Special Effects Makeup Artist</title>
<link rel="sylesheet" href="css/normalize.css">
<link rel="sylesheet" href="css/main.css">
</head>
Daryl Stamps
1,049 Pointsbelow is my main.css code:
body {
background-color: orange;
}
Joe Dayvie
11,956 PointsYour meta tag is incorrect as it should be UTF-8. I know this may sound silly but I just wanted to ask - Is that your entire index.html code or do you have more? If not, then you need to actually have a body tag in your index page for the background to be applied to.
Daryl Stamps
1,049 PointsI do have a body, I was just posting the <head> section, because that is where i believe where he problem lies. Also, thanks for the UTF-8 heads up, that data was wrong on my end.
Joe Dayvie
11,956 PointsDid you check to make sure the actual files are in the CSS folder?