0

Background

How do you keep a background image in html center to the window so if you resize the window the background image will resize with it?

17th Nov 2017, 2:46 AM
Kyle
3 Answers
+ 3
u can use background-position : center or margin of block container box is margin: 0px auto;
17th Nov 2017, 3:20 AM
Mukhtaar Aziz
Mukhtaar Aziz - avatar
+ 1
If there is a large sized image you could use image-size: contain; image-position: 50px 50px; Adjust the percentage values to find the best spot.
17th Nov 2017, 5:07 AM
CalviŐČ
CalviŐČ - avatar