Topic: Double Navigation with fixed SideNav & fixed Navbar: reduce extra margin
2acode pro asked 5 years ago
Hi, why in the navigation composition n.7 there is an extra margin (top and left ) on the main tag? https://mdbootstrap.com/snippets/jquery/mdbootstrap/102686?action=full_screen_mode
How can i reduce it to minimum required?
Thanks
Marta Wierzbicka staff answered 5 years ago
Hi,
so, do you need more help from me?
Best, Marta
2acode pro commented 5 years ago
At the moment, no, but in the future I will certainly ask for your help again! ;-) Alessandro
Marta Wierzbicka staff commented 5 years ago
Hi, I am here to help you ;) Best, Marta
2acode pro answered 5 years ago
Hi,
for the margin i used the utility <main class="m-0">
but the padding is used to positioning the main div (without overlapping navs), so to reduce top space need to modify the style:
.fixed-sn main,
.hidden-sn main {
padding-top: 4.5rem;
}
Thank you Marta
Marta Wierzbicka staff answered 5 years ago
Hi,
in this layout, everything looks as it should. You can modify margin and padding by adding the spacing classes https://mdbootstrap.com/docs/jquery/utilities/spacing/ to the <main>
tag like here <main class="p-0 m-0">
.
Best, Marta
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.6.1
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: Yes