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
498 Points
Changes to my CSS not showing up in HTML website
When I try to change background color or make any css changes, it does not change in the preview. I thought this was because I did not link my HTML to my css file correctly, but I believe I did. Below is some of my code, please help.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Teddy Rounds | Photos</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Teddy Rounds</h1>
<h2>Photos</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
6 Answers
marvelousperson206
9,199 PointsYour HTML looks alright, show us your CSS code :)
Kyle Roberts
7,299 PointsI don't know if this is what is causing the problem, but your HTML is not in a head section, (nor do you have a body section declared).
498 Points
Thank you kyle, there is a head it just didnt copy and paste, same with the body.
marvelousperson206
9,199 PointsHmm I can't see whats wrong. I am on my phone atm though... do you have <html> element starting under the DOCTYPE in your markup? Or did it just not copy and paste like you said?
marvelousperson206
9,199 Points*html element
498 Points
Yes I have <html> then under it <head> then what is listed above with a closing </head> following the css links
marvelousperson206
9,199 PointsIt will be something simple that's been missed out. I guarantee you lol... but I can't see all your code properly so it's hard to pin point. I gotta go to sleep now but will try again tomorrow if you haven't found an answer. Good luck!
498 Points
Thank you! I just want to get back into it!
marvelousperson206
9,199 Pointsany luck?
498 Points
No unfortunately, nothing changes when I adjust the CSS
marvelousperson206
9,199 PointsYou should re-post this question so it goes back to the top of the list, more people will see it. Make sure you copy & paste every bit of your code into it as well.
498 Points
498 PointsThank you Russell!
body { background-color: blue; }
a { text-decoration: none; }
wrapper {
max-width: 940px; margin: 0 auto; padding: 0 5%; }
logo {
text-align: center; margin: 0; }
a { color: #00b4ff; }
header { background: #00b4ff; border-color: #599a68; }
h1, h2 { color: #fff; }
nav { background: #599a68; }
nav a, nav a:visited { color: #fff; }