4

Im in the middle of migrating my project form Bootstrap 2.3.2 to Bootstrap 3.

I am unable to center the navbar links as I was able to before. I used this method previously: Center bootstrap's brand and list items but is not working for my new navbar.

The below link is a jsfiddle direclty using one of bootstraps examples (with the sticky footer and navbar)

Can someone please help me center these links?

http://jsfiddle.net/brainbolt/52VtD/4/

HTML

<div class="navbar navbar-default navbar-fixed-top center">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span>
 <span class="icon-bar"></span>
 <span class="icon-bar"></span>

            </button>
        </div>
        <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li><a href="#about">About</a>
                </li>
                <li><a href="#services">Services & Promos</a>
                </li>
                <li><a href="#contact">Contact</a>
                </li>
            </ul>
        </div>
        <!--/.nav-collapse -->
    </div>
</div>

CSS

 .navbar-default > .container { text-align: center } 

Thanks!

Community
  • 1
  • 1
vpoola88
  • 3,669
  • 4
  • 20
  • 21
  • Good info can be found here: https://stackoverflow.com/questions/20024463/bootstrap-3-how-do-i-place-the-brand-in-the-center-of-the-navbar – tadasajon Dec 02 '14 at 15:14

1 Answers1

1

Refer this site, Paste your bootstrap 2.3.2 code in here, and click button showing 2.x>3.

This will migrate your code automatically to 3.0.

OR

Refer this, to get bootstrap documentation for migration.

Hope this helps.

Chirag B
  • 2,106
  • 2
  • 20
  • 35
  • 1
    So I've tried this, but the CSS doesnt change. And using the same HTML over, the classes for the nav change and are not centered. Am I missing something in my code in specifying the nav? – vpoola88 Aug 29 '13 at 09:28