I am facing an issue with pixel positioning on my web page. I have a cover image set as the background of the body and a button placed on top of it. However, when the page is resized, the button moves along with it. I want the button to remain in its original position even when the screen size changes. This problem arises because I am working on making the website mobile responsive. As I am new to web programming, I am struggling to find a solution.
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<title>test page.</title>
<style>
body {
background:url("test.jpg");
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
}
#mybutton {
position: absolute;
right:800px;
top:300px;
}
</style>
</head>
<body>
<button id="mybutton" onClick="javascript:alert('clicked!');">Click Me!</button>
</body>
</html>