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

CSS

Using CSS to put a horizontal navigation bar below my main-header?

https://w.trhou.se/6bt3wtguul

That's my current code above right now. I'm using this project right now as a way to retain what I am currently learning on treehouse, but I just can get the navigation to appear horizontally below my main header. I have tried using the display property and using the inline value, but it's not displaying :(. Let me know what I am doing wrong haha.

1 Answer

Dan Weru
Dan Weru
47,649 Points

hey, it seems like you have commented out the code inside the nav element in your html.

I commented it out because what I was doing to make it a horizontal navigation bar was not working. I added a class to the ul element, "navigation". But when I select it using the following property value below, it doesn't set it as an inline element.

.... .navigation { display: inline; }

Actually, nevermind. I was able to figure it out lol.