Share this Page URL

Chapter 6. A Picture Is Worth a Thousand... > Images: Some Semi-Important Backgrou... - Pg. 66

A Picture Is Worth a Thousand Clicks: Working with Images 66 Here, filename is, as usual, the name of the graphics file. For the new attributes, use x for the width of the graphic, and y for the height. Both dimensions are measured in pixels (short for picture ele- ments), which are the tiny dots that make up any computer screen image. Any good graphics pro- gram tells you the dimensions of an image. Alternatively, you can express the width and height as percentages of the browser window. For example, the following line displays the image bluebar.gif so its width always takes up 90 percent of the screen: <IMG SRC="bluebar.gif" WIDTH=90%> The advantage here is that, no matter what size screen someone is using, the graphic always takes up the same amount of room across the screen. As proof, check out the next two figures showing the bluebar.gif image with WIDTH set to 90 percent. As you can see in Figures 6.2 and 6.3, the image always usurps 90 percent of the available width, no matter how big the Internet Explorer window. (Note, too, that because I didn't specify the HEIGHT, Internet Explorer adjusts the height in proportion to the increase or decrease of the width.)