My current goal is to implement a Bootstrap dropdown menu that appears when a button is clicked. Within my component structure, the code looks like this:
<>
<div className='1'>
<navbar/>
<div>
<homepage/>
</div>
</div>
</>
The button is located inside the <navbar>
component at the top of the page. Upon clicking the button, the component's state changes and another component is displayed (which contains the items in the drop-down menu).
Currently, when I click the button, the drop-down items appear next to the button within the <div>
containing the <navbar>
component (classname=1). However, I want the dropdown menu to overlay everything on the page, including the content in the <homepage>
component.
Is there a way to achieve this desired effect?
Edit:
As of now, I am using simple drop-downs, such as those found here: https://getbootstrap.com/docs/4.0/components/dropdowns/