How do I get the Burger menu to be on same row as logo and menu dropdown to open below header?
I tried to get the burger menu column to appear next to the logo however, it did not work as I expected. I am still new to coding in html and css. I would appreciate any help!
2
Answers
Can you provide some code example. Although at first glance I assume you can fix this issue by surrounding the two components in a div and setting the
align-item
orjustify-content
to centerwhen creating your nav menu give the parent container a position of relative and set the drop down menu to position absolute, that way you can position it in relation to the parent element. The burger icon can sit in the parent element as normal
in css set the position properties I mentioned and set the the display to none for the drop down menu, create an additional style of active that has a display of block
now in javascript you can select the burger icon add an event listener of click that toggles the active class on the menu