In my web design class, I encountered an issue while creating a page. Currently, my page consists of a navigation bar and an image. I wanted to center both elements using CSS.
display: block;
margin-left: auto;
margin-right: auto
I applied this CSS to the navigation bar and the image. However, I am looking for a way to ensure that the navigation bar always remains above the image, even when the page is resized. Is there a CSS solution for this?