Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

phivosstavrou
Courses Plus Student 1,090 PointsBuild a simple website - Styling Content. Class does not work
Hello,
I've been trying to complete the styling content project but the CSS class does not work. Here are the classes:
.btn {
color: #FAF3BC;
background: #4FB69F url('img/texture.png') no-repeat right top;
padding: 15px 30px;
margin: 40px 0px;
border-radius: 25px;
text-transform: uppercase;}
.btn:hover{
background-color: #4CC4A7;
}
ul.nav{
margin: 120px 0 0 0;
list-style: none;
float: right;
}
ul.nav li{
float: left;
margin-right: 40px;
}
ul.nav li a{
color: #FAF3BC;
}
5 Answers

Chris Mitchell
12,719 PointsThis hasn't been closed <div class="grid_8 omega"
Your class btn is wrong Yours is class"btn" Should be class="btn"
Will go thru more later no time now

Chris Mitchell
12,719 Pointsits possibly in the html page.
Look in the head section and see if you are linking your CSS style sheet properly

phivosstavrou
Courses Plus Student 1,090 Pointsi believe its linked properly because the changes to id selectors are shown to the website

Chris Mitchell
12,719 PointsI would still say its in the html as your code looks fine to me with no errors

phivosstavrou
Courses Plus Student 1,090 Pointshow can i show you the html code?

Alfred van Kuik
2,851 Pointsuh, CSS is not my strong point, but I'm doubting the ul.nav selector. I think that should be .nav ul {}
I might be wrong though :)

Adam Banky
4,601 PointsI'm pretty sure it's because you don't have a space between "ul" and ".nav"
Is the btn class not working as well?

phivosstavrou
Courses Plus Student 1,090 PointsHere is the HTML http://pastie.org/8357803 Here is the CSS http://pastie.org/private/3rhcj41qahhldx1yefh9qq

James Barnett
39,199 PointsInstead of using a pastebin like pastie.org you should use a code playground like codepen.io
Chris Mitchell
12,719 PointsChris Mitchell
12,719 PointsI didnt find anything else wrong in the html, I have copied and tidied up the html to how I would do it but not changed your mistakes. You can do everything without indenting the mark up but best pratice is to indent this way:
<!DOCTYPE HTML>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Smells Like Bakin Cupcake Company</title> <link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/grid.css" type="text/css" media="screen"> <link href='http://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"> </head>
<body> <div class="container clearfix">
</body>
</html>
phivosstavrou
Courses Plus Student 1,090 Pointsphivosstavrou
Courses Plus Student 1,090 Pointsthank you so much Chris!
Chris Mitchell
12,719 PointsChris Mitchell
12,719 Pointsno problem, also forgot to mention that to paste the code into the forum post like i just have, then all you do is hit the spacebar 4 times and hit Ctrl+V to paste your copied code and thats how i just did it. Although it doesnt show the head section for some reason, not sure why.