+ 3

Can i use background-size: 100% 100% so it can fit properly to any kind of size of box without repeatin it self or overlapping

Inserting a background image on a box

6th May 2020, 12:11 PM
Bryan Gonzales
Bryan Gonzales - avatar
2 Answers
+ 8
You can set this property: background-size :cover; This will cover the entire container's background with the image. By default, some images are repeated and it doesn't look perfect. Also if you don't want the image to repeat, then you can use background-repeat : no-repeat;
6th May 2020, 12:19 PM
Nova
Nova - avatar
+ 2
Nova yes thats right but sometimes images stretched causing it them to overlap the container container
6th May 2020, 12:24 PM
Bryan Gonzales
Bryan Gonzales - avatar