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 trialJayson Santos
333 PointsI need assistance please
I could not move to the next level. I am having a hard time trying to figure out what seems to be missing and what is wrong.
I need help please.
Thanks.
/* Complete the challenge by writing CSS below */
.clearfix::after {
content: "";
display: table;
clear: both;
}
.footer-nav {
float: left;
}
.logo-nav {
float: right;
}
<!DOCTYPE html>
<html>
<head>
<title>Getting Started with CSS Layout</title>
<link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<footer>
<img class="logo-class" src="city-logo.svg" alt="logo">
<ul class="footer-nav">
<li><a href="#">Ice cream</a></li>
<li><a href="#">Donuts</a></li>
<li><a href="#">Tea</a></li>
<li><a href="#">Coffee</a></li>
</ul>
<p class="copyright">©2015 The Best City.</p>
</footer>
</div>
</body>
</html>
4 Answers
Steven Parker
231,248 PointsYou have the wrong class name.
The second class mentioned in the instructions is "logo" (not "logo-nav").
izzy goldman
12,542 Points- footer-nav should be
. footer-nav{ float: right; }
Steven Parker
231,248 PointsIzzy, the "clearfix" code was supplied by the challenge. And "::after
" is a pseudo-element, and those are supposed to be designated with two colons. (see the MDN page for official info)
The footer-nav part was already correct, but you're suggesting floating it in the opposite direction. Are you sure you're looking at the same instructions?
Jayson Santos
333 Pointsstill it gives me incorrect answer
This is what I code;
.clearfix::after {
content: "";
display: table;
clear: both;
}
footer-nav { float: right; }
.logo { float: right; }
please Help.
izzy goldman
12,542 Points.footer-nav{ float:left }
.clearfix::after {
content: "";
display: table;
clear: both;
}
.footer-nav{
float:left;
}
.logo{
float:right;
}
`
Steven Parker
231,248 PointsYou had it correct the first time, but now you're missing the period that should start ".footer-nav
" and you have the wrong direction value on the float property (perhaps you got some bad advice):
.footer-nav {
float: left;
}
Also, when posting code, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. (as I have done here).
Jayson Santos
333 PointsStill did not allow me. I still got the incorrect one.
.footer-nav{ float: left }
.clearfix::after { content: ""; display: table; clear: both; }
.footer-nav { float:left; }
.logo { float: right; }
Steven Parker
231,248 PointsJayson, that code should pass task 1. (I tried pasting it into the challenge and it did pass).
But you have the "footer-nav" rule twice, you only need one of them.