May 3 2008

Youtube Images - What an Idea !!!

Look at the given image carefully …

Youtube Master Image

Did anybody see the above image anywhere ? The Answer might be No. But you might see small parts of this picture. The amazing picture’s name is Youtube Master Image. The Youtube Website contains this single image only, and it uses part by part for different occasions with css ( sytle sheet) property background image and scroll position.

You know the whole youtube website is created with a single image !!!

For example, you see the rating pictures just below the youtube video

Youtube Ratings

Here the fully red star is created by:

<img class=”rating icn_star_full_19×20png alt=” style=”vertical-align: top; src=”http://s.ytimg.com/yt/img/pixel-vfl73.gif/>

Here the src is merely a 1 pixel image. The actual star lies in the style class “rating icn_star_full_19×20png”

See the style sheet:

.icn_star_full_19x20png

{

   transparent url("http://s.ytimg.com/yt/img/master-vfl38353.gif") no-repeat scroll -373px -38px

}

Here scroll -373px and -38px exactly points the red star in the master image.

And for youtube logo, it uses same background image (master image) with another scroll location. Scroll is set to 0px for logo

Like that, all the images, thumbs up , thumbs down, border, scroll back, previous next buttons etc etc are displayed from this single picutre.

Amazing Idea Right ?

(Post your comments please)

4 Comments on this post

Trackbacks

  1. Binny V A said:

    This technique is called CSS Sprites. It reduces http requests. Its an optimization technique for very large sites.

    May 3rd, 2008 at 12:08 pm
  2. Calling Stroed Procedure from php said:

    Hi

    I am trying to call the mysql stored procedure from the php code given below

    query($sql1);

    while ($data1 = $query1->fetch_row())
    {
    echo $data1[0].”\n”;
    $sql2 = “call getCapitals(\”".$data1[0].”\”)”;Deutschland

    //SQL which does the same thing:
    //$sql2 = “select concat(country, \”, capital: \”, capital) from countries where country like ‘”.$data1[0].”‘”;

    $query2 = $mysqli->query($sql2);

    while ($data2 = $query2->fetch_row())
    {
    echo $data2[0].”\n”;
    }
    $query2->free(); // unsuccessful attempt to clear the results and get the next SP going
    }
    ?>

    Once i Execute the code i am getting the following result

    Result:

    Deutschland

    Fatal error: Call to a member function fetch_row() on a non-object in C:\wamp\www\SMS\Smart\Test\Test.php on line 27

    I think the problem is that the stored procedure calling is occurring only once.

    Could you please help me to solve this problem?

    Thanks in advance

    Pradeep

    May 6th, 2008 at 4:52 pm
  3. Neenbyday said:

    How i may contact admin this site? I have a question.
    iijiivei

    October 7th, 2008 at 3:44 am
  4. John605 said:
    November 7th, 2008 at 12:55 am

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Sponsors

    Advt on sajithmr.com
    Advt on sajithmr.com
    Advt on sajithmr.com
    Itslife Online

Recent Comments

  • Binny V A: Thanks for the post - love the picture ;-)
  • TheAnand: A lot of people are seeing errors with google video chat….is there any other software which has to be...
  • Alex: Wow, interresting analysis you have done! I’m trying to run GoogleVoiceAndVideoSetup on linux, using...
  • Mella Fitriansyah: Nice plugin, I will try to add this plugin in my blog…
  • Mella Fitriansyah: Nice Info, Sir i will reading your another post success for you

Recent Readers

JOIN MY COMMUNITY!

Recent Posts