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.

CSS CSS Layout Basics Page Layout with the Float Property Footer Layout with Floats

I 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.


/* Complete the challenge by writing CSS below */

.clearfix::after {
  content: "";
  display: table;
  clear: both;
.footer-nav {
float: left;

.logo-nav {
float: right;
<!DOCTYPE html>
    <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">
    <div class="container">
            <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>
            <p class="copyright">&copy;2015 The Best City.</p>

4 Answers

Steven Parker
Steven Parker
216,121 Points

You have the wrong class name.

The second class mentioned in the instructions is "logo" (not "logo-nav").

  1. footer-nav should be . footer-nav{ float: right; }
Steven Parker
Steven Parker
216,121 Points

Izzy, 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?

still 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.

.footer-nav{ float:left }

.clearfix::after { content: ""; display: table; clear: both; } .footer-nav{ float:left; } .logo{ float:right; }`

Steven Parker
Steven Parker
216,121 Points

You 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. :arrow_heading_down: (as I have done here).

Still 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
Steven Parker
216,121 Points

Jayson, 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.