Recently diving into the world of CSS and Bootstrap, I encountered an issue with a Bootstrap button on my webpage. Despite my efforts, I couldn't seem to make it responsive to window resizing. It feels like there's a glitch in the code somewhere, but I can't seem to pinpoint it.
body,
html {
width: 100%;
height: 100%;
font-family: "Montserrat", sans-serif;
}
body {
background-image: url("header.jpg.jpg");
background-size: cover;
background-position: center;
}
h3 {
color: white;
position: relative;
top: 200px;
text-align: center;
}
.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:visited {
background-color: orangered;
border-radius: 24px;
padding: 14px 24px;
outline: 0 none;
cursor: pointer;
}
.container {
position: relative;
}
button {
position: absolute;
top: 480px;
left: 475px;
}
<!DOCTYPE html>
<html>
<head>
<title>Startup</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="startstyle.css">
</head>
<body>
<div class="container">
<h3>THE BIGGEST STARTUP EVENT OF THE YEAR</h3>
<button type="button" class="btn btn-primary">FIND OUT MORE</button>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>