Welcome to WebmasterWorld Guest from 54.163.23.73

Forum Moderators: incrediBILL

Message Too Old, No Replies

<img src> or css background?

Is css faster?

     

suzie250

6:40 am on Aug 13, 2007 (gmt 0)

10+ Year Member



I understand that less http requests mean faster loading times. But by how much?

I have a page that I am working on that has 15 optimized images that are about 325x200. If I placed these images as class or div backgrounds, is it worth the extra markup since the images are so large?

Also, won't the page just stay blank until the css file is done loading all the images anyhow?

Fotiman

4:54 pm on Aug 13, 2007 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Regardless of whether you're serving the images as content (with the <img> element) or whether you're serving the images as presentation (CSS backgrounds), each image is still going to require an HTTP request. Whether or not you serve the images as background images or not really depends on whether they are content or just presentation.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month