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

Lisa Hillebrand
1,781 PointsChange background color of navigation bar
Hi there
I tried to change the color of the navigation bar, but it does not seem to work. Using Bootstrap 4.
HTML
<body data-spy="scroll" data-target="#mynavbar" data-offset="100" id="willkommen"> <!-- Create navigation bar --> <nav class="navbar"> <!-- Create button for hamburger menu --> <div class="row"> <div class="col-xs-1 offset-xs-10"> <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#mynavbar"></button> </div> </div>
CSS .navbar { background-color: #00b4c5; }
2 Answers

Jacob Herrington
15,835 PointsHey Lisa!
This worked for me:
nav {
background-color: #00b4c5;
}
Let me know if that solves your problem!

Lisa Hillebrand
1,781 PointsDoes not work for me. But I figured that this does:
body .navbar { background-color: #00b4c5; }
Thanks so much for your reply!