Topic: Full Page Intro with fixed, transparent Navbar not working
The navbar is not changing its background color when scrolling starts, everything else works. I am using this example - https://mdbootstrap.com/live/_MDB/index/docs/page-layouts/intro-fixed-transparent.html
.top-nav-collapse {background-color: #4285F4;}@media only screen and (max-width: 768px) {.navbar {background-color: #4285F4;}}
Damian Gemza staff answered 7 years ago
.top-nav-collapse class?You have to add background-color styles in global stylesheet called: "styles.scss". He is in root/src folder of your's application. Just let me know, if it won't work in your's project. Best Regards, Damian
vrund pro commented 7 years ago
Yes, I have that .top-nav-collapse class in the styles.scss file. Thats the only class I need to make it change color on scroll right? Also, how is this class added to the DOM. I don't see it in my current HTML code. Is it dynamically being added?Damian Gemza staff answered 7 years ago
vrund pro commented 7 years ago
Hi Damian, I tried inspecting and it's not adding the class to the DOM. Is there any MDB javascript file that I need to include in the scripts array in angular-cli.json?Damian Gemza staff answered 7 years ago
vrund pro commented 7 years ago
My navbar has <pre> <div><mdb-navbar SideClass="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar transparent" [containerInside]="false"></div> </pre>Damian Gemza staff answered 7 years ago
<mdb-navbar SideClass="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar transparent" [containerInside]="false"></div>try to remove class 'transparent'. It should now work. If not, just send me your's whole project to me. Best Regards, Damian
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 Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes