How can I create a resizable dynamic background image in CSS that adapts to the size of the browser window?
#mainPage {
width: 100%;
height: 100%;
font-size: 3vw;
text-transform: uppercase;
background: black;
font-weight: bold;
position: fixed;
background-image: url('imagesfolder/someImage.jpg');
}
I have tried placing the image directly in the html page, but it ends up being treated as inline and causes placement issues with other elements. My goal is to have an image that resizes with the browser window, while also having divs containing text on top of the image that scale accordingly. I am more familiar with absolute positioning rather than responsive layouts, so any help would be appreciated.