As a beginner, I am working on designing a mobile-responsive navbar using Bootstrap 4. Here is my vision for how it should appear on different devices:
For full-width displays, the layout should include:
- Logo (aligned to the left)
- Links (also aligned to the left)
- Profile picture dropdown menu (aligned to the right)
On tablet displays, the layout should change to:
- Logo (centered)
- Links (left-aligned and collapsed into a hamburger menu)
- Profile picture dropdown menu (still right-aligned) - with minimal changes
While I have made progress in implementing most of this design, there is an issue when clicking on the hamburger menu. It causes the profile picture menu to shift downwards, which is not intended.
To view the current state of the navbar, visit: https://www.bootply.com/6a0BWZivYL
My main question is regarding how to keep the profile picture dropdown menu fixed to the right side?
I have attempted to rearrange the code for navbar-collapse collapse
after the profile picture section, which resolves the issue on tablets but disrupts the alignment on full-width displays.
Despite searching online, I haven't discovered examples precisely addressing this problem. The closest match I found can be viewed here: . However, this example includes two collapsible menus whereas I aim to have only one collapsible menu alongside a fixed dropdown menu.