r/csshelp • • Jan 16 '24

Help for background cover responsiveness

Hi,I have a problem with "body {background-size: cover;}" when the address bar (android chrome) collapses, it waits until the scroll ends to re-size which make a white gape in the bottom !
body {
background-image: url(back.jpg);
background-size:cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
height: 100dvh;
width: 100%;
margin: 0;
position: relative;
overflow-x:hidden;
overflow-y:scroll;
}

0 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/fondbcn Jan 17 '24

...

Thanks,
both methods worked, but the slight scroll after the re-size is still there (visible re-size looks like a scroll)