Hi all,
I posted a question regarding using an image as a div background, and have seen a couple other threads mentioning div size.
My question then, is, while pictures are measured in pixel res, how can you determine your div size?
Should I be specifying my div size in pixels, to match that of the picture or larger, so it doesn’t distort it? (assuming I want the image to fill the div). Or will the div just cut off the parts of the image outside the div?
It’s up to you, really. The image will be of fixed size, so if you want the div to stay the same size, set it in pixels. If the image is larger than the div, then yes, the div will cut it off—no matter how the div is sized. But if the div grows larger than the image, it still won’t distort a background image: you’ll just see space either side of the image.