Background | SoloLearn: Learn to code for FREE!



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?

11/17/2017 2:46:24 AM


3 Answers

New Answer


u can use background-position : center or margin of block container box is margin: 0px auto;


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.