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

Please help with my navbar (codepen included)

This is driving me nuts... I'm using bootstrap, but I cannot get my li elements to center within the ul. What am I doing wrong? Is bootstrap overriding my css somehow? I added the !important bit to help but it didn't do anything. Thanks for any help!

http://codepen.io/SethCodepen/pen/iEqwl

P.S. -> I'm also trying to make the font smaller as well so it adjusts when using a tablet or phone. That's not working either :( Please help

1 Answer

I found a possible solution on stackoverflow. Adding the below code to your CSS centered it.

.navbar .navbar-nav { display: inline-block; float: none; }

.navbar .navbar-collapse { text-align: center; }

Here's the link I found it on. Hope that helps. http://stackoverflow.com/questions/18777235/center-content-in-responsive-bootstrap-navbar