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 Bootstrap 4 Basics (Retired) Using Bootstrap Components Building a Navbar

Savannah Lynn
Savannah Lynn
13,662 Points

navbar-brand and toggler-icon are ignoring margins and centering on xs only

<!--Navbar -->  
    <nav class="navbar navbar-toggleable-sm navbar-inverse bg-primary">
      <div class="container"> <!--Nav Container -->
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item">
              <a class="nav-link" href="#">Home</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#about">About</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#speakers">Speakers</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#schedule">Schedule</a>
            </li>
          </ul>
        </div>
          <a class="navbar-brand" href="http://www.teamtreehouse.com">Presented by Treehouse</a>   
     </div> <!--End Nav Container-->
  </nav> <!--End Navbar -->

3 Answers

Savannah Lynn
Savannah Lynn
13,662 Points

I'm actually using the teacher's notes and I am getting this performance. I have already referenced the documentation, that is why I am now asking here.

Andy Watts
Andy Watts
20,836 Points

This is still happening using the current alpha version, and the code snippet in teachers notes. Does anyone have an answer?

Dalton Dunn
Dalton Dunn
6,709 Points

The snippet of code in the teacher's note is what you want bootstrap 4 is still in alpha and changes a lot, just take a look at either the bootstrap 4 documentation or the teacher's notes to make sure you have updated class names and such