Everything is Broken

Youtube web design CSS trick

I was just idly playing on the youtube site, and I discovered a neat trick which their designers used. All the images from the page (with the exception of the video previews) are held in a single image, which is then re-positioned on the page using CSS to create the illusion of several images. To see the big image, click on the grey bar at the top for example and select View Background Image. Or you can just click on this link:

http://s.ytimg.com/yt/img/master-vfl55102.gif

Now check out the upload button for example. You can see this is made up of a section of the long yellow bar, and then the yellow lozenge at the top of the image overlaid to create the left and right rounded corners of the button. Very cool.

This approach means that the site only ever has to load a single image for all the design, and consequently the pages have a much quicker load time. Genius. Why didn’t I think of that …

This entry was posted on Sunday, September 14th, 2008 at 11:04 am and is filed under General IT. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Bunch of Yahoos.
Strange SmartBro URL hijacking »

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image
  • Recent Posts

    • ClamAV reporting Outdated version
    • Adventures in unbricking a router
    • One Line Guitar Tuner
    • Captcha Madness
    • Ubuntu upgrade 9.04 to 9.10
  • Sing for your supper

  • Static

    • About
    • Privacy Policy
  • Tags

    apathy apple calendar chkconfig collanos cross-platform eee evolution firmware google grub hotspot id card lightning Linux Mandriva notebook partitioning pclinuxos pclinuxos 2008 Philippines power management re-install sane scanner scheduleworld script Security slow sysv-rc-conf thinkpad thunderbird trust ubuntu ultraportable usb virtualisation vmware vpn wifi wireless workspace sharing xsane yahoo zombie
  • Blogroll

    • Datalude
    • Digital Life
    • Engage the World
  • Archives

    • May 2010
    • April 2010
    • March 2010
    • November 2009
    • October 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • April 2008
    • March 2008
    • February 2008

Everything is Broken runs on WordPress. Theme by Bob. All content Copyright © Datalude 2008+.