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

HTML

navigation

hello, im trying to move my navigation menu to the center of my page but i dont know how. Im using the html course and i copy its css file, but it only works on the right or left of the page.

can some one help me!

Show us the code you have then we can look at where you may be going wrong. Other than that its hard to answer your question.

this is the code

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

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

ul.nav li a { color: #333; text-decoration: none; padding: 7px; }

ul.nav li a:hover { color: #fff; background-image: url('../img/bacg-002.png'); border-radius: 0 7px 0 0; padding: 7px; }

this is the code

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

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

ul.nav li a { color: #333; text-decoration: none; padding: 7px; }

ul.nav li a:hover { color: #fff; background-image: url('../img/bacg-002.png'); border-radius: 0 7px 0 0; padding: 7px; }

Would help to see the html also.

1 Answer

Try adding

text-align: center;

to the ul.nav