Topic: How To change Navbar Background Color
                  
                  kodero
                  pro
                  asked 7 years ago
                
                      
                      martin.mamdouh2014@gmail.com
                      free
                        answered 6 years ago
                    
it works with me after using ::ng-deep
.scss file
       ::ng-deep .navCss nav
   {
         background-color: #CEDD43;
   }
.html
 <mdb-navbar SideClass="navbar navbar-expand-lg  navbar-dark "class="navCss" [containerInside]="true">
                    
                      Marta Wierzbicka free commented 6 years ago
Hi,
for MDB Angular package, please select correct technology "Angular" on our forum.
Best, Marta
                      
                      Marta Wierzbicka
                      free
                        answered 7 years ago
                    
Elcox pro commented 7 years ago
Hello, Marta! Many thanks! Your two-step solution works perfectly; i now have the black navbar I need for my Home Page. Best wishes, Alex Ross, Oxford.Marta Wierzbicka free commented 7 years ago
Hi, you're welcome. Best, Marta
                      
                      rocini.jr
                      free
                        answered 7 years ago
                    
                      
                      Marta Wierzbicka
                      free
                        answered 7 years ago
                    
style.css file and paste code like this and save:
.navbar {
background-color: #e91e63;
}
Second step: go to your index.html file and remove our color class from the navbar and save the file.
Instead of this: <nav class="navbar navbar-expand-lg navbar-dark primary-color"> do this: <nav class="navbar navbar-expand-lg navbar-dark">.
 
After that, a background color of navbar will change.
Best,
Marta
                    
                      
                      
                      rocini.jr
                      free
                        answered 7 years ago
                    
                      
                      Marta Wierzbicka
                      free
                        answered 7 years ago
                    
                      
                      Marta Wierzbicka
                      free
                        answered 7 years ago
                    
!important to a color. Like this: background-color: #404acd !important;.
Best,
Marta
                    
                      FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
 - Premium support: No
 - Technology: MDB jQuery
 - MDB Version: -
 - Device: -
 - Browser: -
 - OS: -
 - Provided sample code: Yes
 - Provided link: No