Supersize that Background, Please!
7 July 2010
These are exciting times for web developers, with all the browser makers working hard to implement upcoming technologies like HTML5 and CSS3. As a result, it’s time to start revisiting old techniques to see how the same things can be done in smarter, cleaner ways.
An interesting hybrid of techniques I’ve used for the large header images on this site – this latest version uses the CSS3 background-size property to scale it appropriately. Previous versions used javacript to switch different sized images in and out depending on how big the image was, and using media queries to do the same is pretty nifty, however I dropped it for this version as it turned out most people were ending up with the same size image anyway (as the majority of visitors had similar browser window size) and the file size savings weren’t that great.
Visit ➔
David Emery Online