One of the problems i have is the more wide the page is, the more image is hidden. To be more clear, i want the whole image to always be visible and stretch or shring when needed. Here’s the code im using
Of course not, an empty container will have no height unless you specify one via css.
As always, the correct method depends upon context, which we don’t have, presumably this is not going to be an empty web page.
I warn against designing your site before adding content.
You can’t decorate a house that has yet to be built, the paint won’t stick.
You shouldn’t really be stretching images of things that are real life. If its a picture of a person a place or an object then it really needs to maintain its aspect ratio when its is stretched/squashed.
If the image is an abstract decoration then yes you can stretch it but if you are stretching a landscape or a person to fit your screen by stretching or squashing then generally that is considered bad practice and amateurish.
There are odd exceptions where you stretch the image for effect or if perhaps its just something like grass or a field or sky but generally don’t squash real life images without preserving the aspect ratio unless that’s what you meant to do.