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
chiara capuzzo
1,529 Pointsselectors get red in file main.css
hi guys, few of the selectors I've typed into the file main.css get red (like an error) and won't display the effects correctly on the browser. Any ideas? Thanks Chiara
9 Answers
Josh Keenan
20,316 PointsThey're all simple, closing tags in html, closing quotations, closing braces etc.
chiara capuzzo
1,529 PointsHi Josh, Here's a part of the file. Body. header, nav are highlighted in red. Previous selectors aren't (h1, a) Thanks
/****************** COLORS ******************/
/* site body */ body { background-color: #fff; color: #999; }
/* green header */ header { background-color:#6ab47b; border-color:#599a68; }
/* nav background on mobile */ nav { background: #599a68; }
Josh Keenan
20,316 PointsNot getting any problems here, can you post all css and html please.
chiara capuzzo
1,529 PointsSure. Hope copy and paste is the proper way to do it.
INDEX.HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chiara Capuzzo │ Designer </title>
<link rel="stylesheet" href="css/normalize.css">
<link href='https://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400,700,700italic,800,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Chiara Capuzzo</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html" class="selected">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<ul>
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>Drips created using PH brushes.</p>
</a>
</li>
<li>
<a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>Creates shapes.</p>
</a>
</li>
<li>
<a href="img/numbers-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>Whatever.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="twitter logo"></a>
<a href="http://facebook.com/chiara.capuzzo31"><img src="img/facebook-wrap.png" alt="facebook logo"></a>
<p>© 2014 Chiara Capuzzo.</p>
</footer>
</div>
</body>
</html>
MAIN.CSS
/****************** GENERAL ******************/
wrapper {
max-width: 940px; margin: 0 auto; padding: 0 5%; }
a { text-decoration:none; }
/****************** HEADING ******************/
logo {
text-align: center; margin: 0; }
h1 { font-family: 'Changa-One, sans-serif; margin: 15px 0; font-size: 1.75em;
/****************** COLORS ******************/
/* site body */ body { background-color: #fff; color: #999; }
/* green header */ header { background-color:#6ab47b; border-color:#599a68; }
/* nav background on mobile */ nav { background: #599a68; }
/* logo text */ h1, h2 { color: #fff; }
/* links */ a { color: #6ab47b; }
/* nav link */ nav a, nav a:visited { color: #fff; }
/* selected nav link */ nav a.selected, nav a:hover { color: #32673f; }
Josh Keenan
20,316 PointsFixing it all now, there are quite a few little bugs.
chiara capuzzo
1,529 Pointsgosh, can't see them...thanks
chiara capuzzo
1,529 Pointsfound it now...there was a curly bracket left open, feeling stupid. anyway, thanks really. I'll check the html just to be sure there's no error in there too have a good day
Josh Keenan
20,316 PointsThere's more than that! html has problems, done css on html right now.
chiara capuzzo
1,529 PointsI'll have a better look but if u have time to paste the corrected version it'b be great. Thanks
Josh Keenan
20,316 PointsJosh Keenan
20,316 PointsCan you post your CSS?