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 trialJonny Strange
6,412 PointsBootstrap's Inverse navbar
I'm using bootstrap's inverse navbar, I'm trying to change the navbar-nav background color from transparent to black (on mobile version), but I can't find the code to change it.
2 Answers
Sean Gaffney
Front End Web Development Techdegree Student 2,560 PointsPresumably you're using a modern browser and you can use its developer tools to find the exact line of CSS that you would need to modify. Here's some help on using Chrome's Dev Tools.
Once you've found the CSS that you'd need to change, I'd suggest however that you not actually change the CSS in your Bootstrap CSS, but rather create a separate CSS file (or SASS or SCSS or LESS file if you're using one of those) to contain all of your tweaks and customizations only for the particular selectors that you need to modify. The reason being so that you can cleanly upgrade your Bootstrap CSS to future versions without having to hunt down and re-implement all of your customizations.
Brett Smith
4,261 PointsThe class that assigns the background-color is .navbar-inverse
@media only screen and (max-width: 767px) {
.navbar-inverse {
color: #000000;
}
}
Sean Gaffney
Front End Web Development Techdegree Student 2,560 PointsGive a man a fish... Teach a man to fish...
Brett Smith
4,261 Pointsmy bad
Sean Gaffney
Front End Web Development Techdegree Student 2,560 PointsNot at all!