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
Jason Nelson
6,209 PointsProblem with code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Casual | Consumer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/casual.css">
</head>
<body>
<header>
<a href="casual.html">
<h1>The Casual | Consumer</h1>
<h2>Blogger</h2>
</a>
<nav>
<ul>
<li><a href="aboutcasual.html">About</a></li>
<li><a href="examplescasual.html">Examples</a></li>
<li><a href="contactcasual.html">Contact</a></li>
</ul>
</nav>
</header>
<a href="img/bag.jpg">
<img src="img/bag.jpg" alt="A image of a brand new shopping bag">
<p>The Consumer</p>
</a>
<a href="casual.html">Go Back</a>
<footer>
<p>© 2015 Jason Nelson.</p>
<a href= http://twitter.com/xxx><img src="img/twitter-wrap.png" alt="Twitter logo"></a>
<a href= http://instagram.com/xxx><img src="img/insta.png" alt="Instagram logo"></a>
</footer>
</body>
</html>
I'm making a simple webpage for myself. For some reason my CSS class for text-decloration isn't working for my h1, h2 elements, and my body element styling doesn't show up when I refresh my page. Am I missing some markup? I'm pretty sure my indents are screwed. Any help would be great.
h1 , h2 {
text-align: center;
color: #999;
text-decoration: none;
}
body{
color: black;
}
p{
color: blue;
text-align: center;
}
body{
color: black;
}
2 Answers
James Casavant
21,522 PointsTo remove the text-decoration select the "a" element, not the h1 element:
a {
text-decoration: none;
}
or
header a {
text-decoration: none;
}
If you are trying to change the background color of your body, make sure to use the background-color property and not the color property:
body{
background-color: black;
}
I would also suggest putting the body CSS at the top of your CSS file.
Jason Nelson
6,209 PointsWow can't believe I messed up on something so simply!!,Thanks for your help!
James Casavant
21,522 PointsYou're welcome! Best of luck!