<div class="container">
<div class="text-container">
<h2>Some Centered Large Text</h2>
</div>
</div>
body {
margin: 0;
padding: 0;
}
.container {
position: fixed;
width: 100vw;
height: 100vh;
background-image: url('https://www.thediygolfer.com/wp-content/uploads/2020/12/homepage-background.jpg');
background-position: right center;
background-size: cover;
background-repeat: no-repeat;
text-align: center;
}
.text-container {
background-color: white;
width: 200px;
margin: 50px auto;
padding: 20px;
border: 1px solid black;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.