I have a div
that has size 200x300 and one that has 50x100, the 2 div
will receive background-image: url('')
that the user informs, however he can put an image with size 1280x720, soon, the image will appear a little bit in div
, how could I resize it to fit in the div? In the case, in one place have the size 200x300 and elsewhere have the size of 50x100 using only javascript or css?