Topic: Slim side-nav set behind Top Navigation bar

rashesh patel free asked 2 years ago


Hi,

In MDB React As we can see that the side-nav and slim side-nav is upon the TopNavigation bar. I have to set that slim side-nav behind the TopNavigation bar so that when I maximize the slim side-nav it can not cover the Left portion of Top navigation and Main page.

Thank you.


Jakub Chmura staff answered 2 years ago


Hi @rashesh patel,

I understand that you want slim MDBSideNav to open under MDBNavbar, right?

It's simple please use a z-index and set a value to 2000 for example:

 <MDBNavbar
            style={{ zIndex: '2000' }}
            {...}
          >

or just add a custom CSS class to your CSS stylesheet for example:

div .fixed-top {
    z-index: 2000;
}

Let me know if I don't understand you correctly and describe your problem in more detail.

Best, Kuba


rashesh patel free commented 2 years ago

Hi Jakub

Thank you...It works but by the same time it affects MDBmodal which is also open under MDBNavbar.


Jakub Chmura staff commented 2 years ago

You must choose z-index that will not interfere with other elements.

Modal has z-index: 1050.

Best, Kuba



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.18.1
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No