I have an image for a web page design, and I embedded it in an HTML file to display it. Here is the CSS code:
.imageMain {
position: relative;
height: 100vh;
/* For 100% screen height */
width: 100vw;
/* For 100% screen width */
}
img#homeinactive {
position: relative;
top: -960px;
left: 750px;
width: 40px;
height: 40px;
z-index: 999;
}
Now I want to add a small image on top of the main image to act as a button that redirects users somewhere. However, the small image is not staying in place when the screen size changes due to the .imageMain CSS class stretching the main image automatically. Any suggestions on how to keep the small image at the top center regardless of screen size?
The current CSS for positioning the small image is incorrect.
Here's the HTML: