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

Use ID selectors - workspaces

Hi, Cannot get background-color to display orange when I preview. Thanks


code for index.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Hugh Lancaster | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>


here is main.css code: body { background-color:orange;

} All folders are uploaded in workspaces.

Hugh I don't think you formatted your code right.

4 Answers

Your're selecting the body tag correctly with css but I don't see any body in your html. Hugh... Neither I see a <link> tag or a <head>. Try writing this: html <!DOCTYPE html> <html> <head> <title>My Page</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <h1>Hugh Lancaster | Designer</h1> </body> </html> If your css file is named "style.css" and it's placed in the same folder.. this should work just fine!

sorry for the formatting, I haven't understand how Markdown comment works yet.

sorry for the formatting, I haven't understand how Markdown comment works yet.

Thanks for the replies. Sorry, I did not paste all the code nor did I give enough information. I can take the same code, index.html, css folder and save to a folder on the desktop. Open index.html from the desktop and it works as stated by instructor but I could not get it to work within workspaces.

Thanks forma the link Jeff.

Hugh probably you need to double check the href attribute in The link tag. Can't think of any other issue than this.