Topic: How To change Navbar Background Color
rocini.jr answered 7 years ago
Marta Szymanska staff pro premium answered 7 years ago
!important
to a color. Like this: background-color: #404acd !important;
.
Best,
Marta Marta Szymanska staff pro premium answered 7 years ago
rocini.jr answered 7 years ago
Marta Szymanska staff pro premium 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 Marta Szymanska staff pro premium answered 7 years ago
Elcox pro commented 6 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 Szymanska staff pro premium commented 6 years ago
Hi, you're welcome. Best, Martamartin.mamdouh2014@gmail.com answered 5 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 Szymanska staff pro premium commented 5 years ago
Hi,
for MDB Angular package, please select correct technology "Angular" on our forum.
Best, Marta
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: No