Robert McIntosh pro asked 7 years ago


Hello, I notice a few of your examples makes a transparent navbar and then shows the color once you scroll down. I just wanted to offer an improvement to your method. Currently you just don't set a color but then on a when you check for a class and add the color then.
@media only screen and (max-width: 768px) {     
    .navbar-transparent:not(.top-nav-collapse) {
        background-color: transparent !important;
    }
}
this way, the navbar uses its standard colors you set, but will be transparent as long as the navbar doesn't have the class .top-nav-collapse Either way, this is just a suggestions. Should be support in all browsers and IE9+

Thank you for your suggestion. We'll take a look at this ;)

Robert McIntosh pro answered 7 years ago


Can you not edit posts? I screwed up the code in the example above, it should be:
@media only screen and (min-width: 544px) {
    .navbar-transparent:not(.top-nav-collapse) {
        background-color: transparent !important;
    }
}


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags