As I work on coding a page for an assignment, I'm faced with the challenge of implementing a navigation bar with three sections: Business Plan, About Us, and Contact Us. While trying to incorporate clickable buttons using label and radio input elements, I encountered difficulty in making the buttons function properly without disrupting the CSS styling of the navbar.
I need guidance on how to achieve this functionality without compromising the layout. What am I missing in my approach?
This is the code snippet that I have been working on. My attempt to integrate the buttons within the div tags has led to undesirable outcomes, such as disrupting the layout by nesting elements incorrectly.
Although I managed to get close to the desired outcome, I ended up having two navbars where the visually appealing one did not function as intended.
For instance, clicking on "Business Plan" should reveal "Mission...", "Threats...", and other related elements as shown in this example.
Similarly, selecting "Location" should display the content illustrated in this example.
Here are the HTML and CSS snippets: