can someone help me with how to set responsive wallpaper to match the current window size?

Good afternoon everyone, I was just needing help with setting wallpaper to change size according to the size of the window #html-and-css
6 Replies
Jochem
Jochem2y ago
do you mean the background image on the body tag or some other tag?
Developer33
Developer33OP2y ago
yea the body tag. I just want to know to make the wallpaper responsive to any size screen. you know how you can use rem , em relative measurements. thanks
Jochem
Jochem2y ago
em and rem are not relative to screen size, just font size https://developer.mozilla.org/en-US/docs/Web/CSS/background-size This should be what you want
Developer33
Developer33OP2y ago
Oh thanks
Tok124 (CSS Nerd)
You can also do this
html, body {
min-height: 100%;
}

body {
background: url(//unsplash.it/1920/1080) center / cover no-repeat;
}
html, body {
min-height: 100%;
}

body {
background: url(//unsplash.it/1920/1080) center / cover no-repeat;
}
Developer33
Developer33OP2y ago
Thanks for all the help. Happy Coding
Want results from more Discord servers?
Add your server