The larger the file size of an image, the slower it will download. Keeping that in mind, I have a couple of questions . . . 1) Does placing the image as a background image instead of embedding it using <img> make any difference on file size and download speed? 2) Say I wanted to put borders running down both sides of my site's <body>. I could do this with a single, large background image, stretching all the way down the <body>. I can also simply take a horizontal slice of this image and repeat it downwards. Both methods will produce the exact same output. However, which one would take longer to download?
Hi, 1) Does placing the image as a background image instead of embedding it using <img> make any difference on file size and download speed? No, it does not make any difference. 2) Say I wanted to put borders running down both sides of my site's <body>. I could do this with a single, large background image, stretching all the way down the <body>. I can also simply take a horizontal slice of this image and repeat it downwards. Both methods will produce the exact same output. However, which one would take longer to download? It's better you take a horizontal slice and repeat it downwards. It will take less time to download. Hope this helps, Cheers, Maneet Puri
what about the different screen sizes, and resoutions the users would have. You can make it look right when viewed on maximized browser window at a 1260, but how would it look like for users at 1024 ot 1600?
Just make sure your background is geared for a wide range of resolutions. Center it and then if you do a horizontal slice make sure it is long enough for higher resolutions, if not then it will have to repeat which means lining up your background. Of course lower resolutions won't see the full background.