Currently, I am working on creating a small responsive webpage that features a background image with several buttons placed on top of it. To set the background image, I included the following CSS:
.background {
height: 100vh;
width: 100%;
background: url('https://images.pexels.com/photos/1563564/pexels-photo-1563564.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260') no-repeat;
background-size: cover;
}
However, I encountered an issue where resizing the browser window caused the buttons to stack vertically. As a result, users could scroll down to the bottom of the page and see a large white space.
My goal is to have the background image resize along with the browser window to prevent this issue. If you have any suggestions or ideas on how to achieve this, I would appreciate the help.
UPDATE: I attempted the suggested solution but did not see any improvement. I have provided a link to a StackBlitz page that contains my code for reference:
https://stackblitz.com/edit/angular-y1avtu?file=src%2Findex.html
Feel free to resize the window on the StackBlitz page to observe the vertical stacking of buttons and the appearance of a large white space at the bottom of the webpage, which I am trying to avoid.