small buttonHTML for Technophobes

©David Knopfler/Willa Cline July 1998

Chapter Nine: Images and how to make two open in sequence.

This, you will remember, is the basic code you need to display an image that's 408 pixels wide and 60 pixels deep:

<IMG SRC="Colour.gif" WIDTH="408" HEIGHT="60" ALIGN="LEFT" BORDER="0">

This is the code you need to have a low resolution image open first and then be succeeded by a second image:

<IMG SRC="Colour.gif" WIDTH="408" HEIGHT="60" ALIGN="LEFT" BORDER="0" LOWSRC="B&W.gif">

The only difference you'll notice is that we've added one tiny piece of extra information LOWSRC="B&W.gif

The result will be that when you open your page the first image you will see will be this one:


b&w.gif


which will quickly be replaced, in the same geographical space, by this one:

b&w and then colour gif


Note that the names of the gifs is not important, as long as they are both the same size and that you put the name of the black and white one after the LOWSRC= piece of the text in brackets in your source code.

Miscellaneous note: We called this image colour.gif (rather than color.gif) just for mischief, [and because I could DK] but if it laterally helps remind English coders that if you are using the word colour as code rather than as a file name, it must comply with the American spelling: i.e. <BODY BGCOLOR="#FFFFFF"> or <CENTER>Centre Text and spell it the American way</CENTER>. To allign, ahem, align the image in the center, erm, centre of the page you'll need to also add the code ALIGN="MIDDLE" right after you've added the height instruction, otherwise it will default to the left.

GIF Animation

If you wanted to make the pictures move back and forth, or do clever things as they change from one to the other instead i.e. animate, a simple way to do it would be to make an animated gif for which you would need proprietary software.

For Mac users [hello again smugees!] the best software for cutting your teeth, is an excellent piece of freeware made by Yves Piguet called GifBuilder. You should be able to find it at any variety of Mac ftp sites but try here first:

http://iawww.epfl.ch/Staff/Yves.Piguet/clip2gif-home/GifBuilder.html

It comes with copious documentation, but of course in the true Mac tradition you'll be too excited playing with the application to bother to read it. It's existence however, makes further explanation here unnecessary

• • • • • • • • • •

For PC users [we of course are above the fray] the aptly named GIF Construction Set is a painless way to make professional looking animations quickly. It features an "Animation Wizard" that guides you through the process, and you'll be making animated gifs in seconds that you'll be proud to show your mother. It's a shareware product that costs $20.00 to register, and it's well worth it. Here's the URL if you want it, but it's also available at most PC download sites: http://www.mindworkshop.com/alchemy/gifcon.html

Back to index