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 trialHyun Tae Choi
1,747 Pointsmain.css problem
For some reason I cannot change the color of my background through main.css
I created the file "main.css", moved it over to CSS. Coded in <link rel="stylesheet" href="css/main.css"> under the normalize.css.
I went into main.css and typed in the code body { background-color: orange; }
However it isn't changing the color of my background when i hit refresh on the view page.
Can anyone please tell me what's going on?
Any information would be greatly appreciated.
2 Answers
Benjamin Lim
17,880 Points'main.css' and 'normalize.css' are separate stylings. You would like to set 'normalize.css' first and then your stylings at 'main.css' Normalize is used to 'normalize' the pages styles.
You would write it as below:
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/main.css" />
Then set your stylings in main.css, refresh browser. Voila! HTH.
Jason Anello
Courses Plus Student 94,610 PointsHi Hyun,
Did you save your main.css file after making the change and then refresh the preview?
Hyun Tae Choi
1,747 PointsYes, I followed the exact steps correctly and I am still having trouble.
Jason Anello
Courses Plus Student 94,610 PointsWhat is currently inside main.css right now? Are any styles taking effect?
Did you look inside your "css" folder to verify that "main.css" is inside it?
Hyun Tae Choi
1,747 PointsHyun Tae Choi
1,747 PointsI followed this step but I am still not seeing the background color. Any other idea of what might be going on?
Hyun Tae Choi
1,747 PointsHyun Tae Choi
1,747 PointsI finally got it to work. My "css" file was capitalized and I inserted it into workspace as a lower-case. Thanks for your help!
Benjamin Lim
17,880 PointsBenjamin Lim
17,880 PointsThat's great to know and you're welcome! ;)