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

Finishing the CSS help

I am building the basic smells like bakin website and I am working on the "nav" section. For whatever reason my "nav" does not respond to any coding I try to do. What might be going wrong here?

<div class="grid_8 omega"
        <ul class="nav omega">
            <li><a href="#"> About </a> </li>
            <li><a href="#"> Cupcakes &amp; Prices </a> </li>
            <li><a href="#"> Locations </a> </li>
            <li class="contact"><a href="#"> Contact Us </a> </li>
        </ul>
    </div>

=====================================================================

ul.nav {
margin: 120px 0 0 0;
list-style: none;
float: right;

}

ul.nav li {
float: left;
margin-right: 40px;

}

Andrew Pritykin
Andrew Pritykin
6,574 Points

Marcus, First make sure that you have your style.css file correctly added in your header. Also check to see if your margin on the page are set to 0, this makes everything on a flat level ground. (Described in earlier videos).

Lastly what browser are you using?

'''css ul.nav { margin: 0 auto; padding: 120px 0 0 0; list-style: none; float: right; }

ul.nav li { float: left; margin-right: 40px;

4 Answers

I just noticed it myself looking @ the coding.. I missed one closing " > " and the whole coding did not work. Jesus you have to be careful with the closing brace.

Glad you found it out yourself. Happy website building

Andrew Pritykin
Andrew Pritykin
6,574 Points

I find myself troubleshooting my code sometimes for hours, and then a friend of mine will look at my code and in a few seconds say "You forgot your semicolin....or closing brace".....[Face Palm]

haha nice =)

Marcus Tisäter
Marcus Tisäter
4,886 Points

I went ahead and corrected you're code. I'm not sure about if this is what you looking for...

.nav ul{
     margin: 120px 0 0 0;
   list-style: none;
   float: right; }


.nav li{
float: left;
margin-right: 40px;

Yeah thanks. I was watching the video and creating the "SLB" website and that was the way they did it.. ---> ul.nav and ul.nav li. Not sure if that was a mistake or what.

I forgot to put "nav omega" as I was having the same problem!