Topic: mdb-side-nav Questions
heath.frankel free asked 6 years ago
Damian Gemza staff answered 6 years ago
.side-nav { overflow: hidden; }
<!-- SideNav slide-out button --> <!-- <a (click)="sidenav.toggle()" class="btn btn-primary p-3 button-collapse"><i class="fa fa-bars"></i></a> --> <!--/. SideNav slide-out button --> <!-- Sidebar navigation --> <mdb-side-nav #sidenav class="fixed side-nav-light white" [fixed]="true" [sidenavBreakpoint]="800"> <!-- Logo --> <div class="d-flex flex-column"style="height: 100%;"> <div> <div class="logo-wrapper waves-light"> <a href="#"> <img class="linkedehr-logo"src="../assets/linkedehr-logo-3.png" /> </a> </div> </div> <mdb-card class="mx-auto"> <mdb-card-body> <mdb-card-title> <h4 class="black-text"> <span class="avatar"> <img height="40"src="https://mdbootstrap.com/img/Photos/Avatars/img%20%2810%29.jpg"class="rounded-circle"> </span> User </h4> </mdb-card-title> <mdb-card-text> Some quick example text to build on the card title and make up the bulk of the card's content. </mdb-card-text> </mdb-card-body> <button mdbBtn color="primary"size="sm"mdbWavesEffect>Account</button> <button mdbBtn color="primary"size="sm"mdbWavesEffect>Settings</button> </mdb-card> <h5 class="grey-text ml-4 mt-4 mb-0 pb-0">user.name</h5> <mdb-accordion class="collapsible collapsible-accordion" [multiple]="true"aria-multiselectable="false"> <!-- Simple link --> <mdb-accordion-item class="no-collase"> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-sign-out mr-2"></i> Logout </mdb-accordion-item-head> <mdb-accordion-item-body></mdb-accordion-item-body> </mdb-accordion-item> <!-- Simple link --> <mdb-accordion-item class="no-collase"> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-key grey-text mr-2"></i> Change Password </mdb-accordion-item-head> <mdb-accordion-item-body></mdb-accordion-item-body> </mdb-accordion-item> </mdb-accordion> <a>Linkacz</a> <div class="border border-top-0 border-left-0 border-right-0 mt-2"></div> <div class="btn-group"mdbDropdown> <button mdbDropdownToggle type="button"mdbBtncolor="primary"class="dropdown-toggle waves-light"mdbWavesEffect> Basic dropdown </button> <div class="dropdown-menu"> <a class="dropdown-item"href="#">Action</a> <a class="dropdown-item"href="#">Another action</a> <a class="dropdown-item"href="#">Something else here</a> <div class="divider dropdown-divider"></div> <a class="dropdown-item"href="#">Separated link</a> </div> </div> <mdb-accordion class="collapsible collapsible-accordion"style="height: 100%;" [multiple]="true" aria-multiselectable="false"> <!-- Collapsible link --> <mdb-accordion-item> <mdb-accordion-item-head mdbWavesEffect>Collapsible menu</mdb-accordion-item-head> <mdb-accordion-item-body> <ul> <li> <a href="#"class="waves-effect"mdbWavesEffect>Link 1</a> </li> <li> <a href="#"class="waves-effect"mdbWavesEffect>Link 2</a> </li> </ul> </mdb-accordion-item-body> </mdb-accordion-item> <!-- Simple link --> <mdb-accordion-item class="no-collase"> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-hand-pointer-o"></i> Simple link</mdb-accordion-item-head> <mdb-accordion-item-body></mdb-accordion-item-body> </mdb-accordion-item> <!-- Collapsible link --> <mdb-accordion-item class="no-collase"> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-eye"></i> Collapsible menu 2</mdb-accordion-item-head> <mdb-accordion-item-body> <ul> <li> <a href="#"class="waves-effect"mdbWavesEffect>Link 1</a> </li> <li> <a href="#"class="waves-effect"mdbWavesEffect>Link 2</a> </li> </ul> </mdb-accordion-item-body> </mdb-accordion-item> <!-- Simple link --> <mdb-accordion-item class="no-collase"> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-hand-pointer-o"></i> Simple link </mdb-accordion-item-head> <mdb-accordion-item-body></mdb-accordion-item-body> </mdb-accordion-item> </mdb-accordion> <mdb-accordion class="collapsible collapsible-accordion" [multiple]="false"aria-multiselectable="false"> <mdb-accordion-item> <mdb-accordion-item-head mdbWavesEffect> <i class="fa fa-user-circle"></i> username</mdb-accordion-item-head> <mdb-accordion-item-body> <ul> <li> <a class="waves"mdbWavesEffect> <i class="fa fa-sign-out mr-2"></i> <span>Logout</span> </a> </li> <li> <a class="waves"mdbWavesEffect> <i class="fa fa-key grey-text mr-2"></i> <span>Change Password</span> </a> </li> </ul> </mdb-accordion-item-body> </mdb-accordion-item> </mdb-accordion> </div> <!--/. Side navigation links --> <div class="sidenav-bg mask-strong"></div> </mdb-side-nav> <div class="main-content"> <h1> Page Title</h1> <p> This is the main content </p> </div> <!--/. Sidebar navigation -->
heath.frankel free answered 6 years ago
Damian Gemza staff answered 6 years ago
- What do you mean by saying that this mess with the foreground? What's wrong there? Flex is the best way to place items in your page layout.
<div class="btn-group" mdbDropdown> <button mdbDropdownToggle type="button" mdbBtn color="primary" class="dropdown-toggle waves-light" mdbWavesEffect> Basic dropdown </button> <div class="dropdown-menu"> <a class="dropdown-item"href="#">Action</a> <a class="dropdown-item"href="#">Another action</a> <a class="dropdown-item"href="#">Something else here</a> <div class="divider dropdown-divider"></div> <a class="dropdown-item" href="#">Separated link</a> </div> </div>
<mdb-card class="mx-auto" style="width: 90%"> <mdb-card-body> <mdb-card-title> <h4 class="black-text"> <span class="avatar"> <img height="40"src="https://mdbootstrap.com/img/Photos/Avatars/img%20%2810%29.jpg"class="rounded-circle"> </span> User </h4> </mdb-card-title> <mdb-card-text> Some quick example text to build on the card title and make up the bulk of the card's content. </mdb-card-text> </mdb-card-body> <button mdbBtn color="primary" size="sm" mdbWavesEffect>Account</button> <button mdbBtn color="primary" size="sm" mdbWavesEffect>Settings</button> </mdb-card>
heath.frankel free commented 6 years ago
Thanks Damian Gemza for prompt response. About the question 1, when you add the flexbox casses "d-flex flex-column" the child items of the collapsible menu has white background. In the sample provided, expand the accordion "username" or "Collapsible menu" and note the foreground is hard to read as it's white. Now remove the classes "d-flex flex-column" and you'll see the difference.FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.2
- Device: Lenovo X1 Carbon
- Browser: Chrome, IE 11+, Firefox
- OS: Window 10
- Provided sample code: No
- Provided link: Yes