Background | SoloLearn: Learn to code for FREE!

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?

11/17/2017 2:46:24 AM

Kyle

3 Answers

New Answer

+3

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

+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.