Home Web Design Programming Fairlight CMI Soap Box Downloads Links Biography About... Site Map

The Holmes Page Images with Percentage Widths

Web Design Design Tips Programming Tricks Web Page Makeovers



BACK TO
WEB
PROGRAMMING
TRICKS

So, you've slaved away for hours crafting the perfect Web page. It fills your browser window just perfectly. 
Now it is time to show it off to your friends. Unfortunately, when they see it, it is scrunched into one corner of the browser window. What went wrong? 
Well, your images were not scaling to fit the window, that's what happened. 
When you specify an image in HTML, you can do it like this:
<IMG SRC="image.gif">
but it would better to do it like this:
<IMG SRC="image.gif" WIDTH=80 HEIGHT=40>
which makes sure that the browser reserves some screen space for the image. 
The numbers represent the dimensions in pixels. This causes a problem if you want the page to scale to fit the browser window. To overcome this problem, you can specify the dimensions in percentages of the window dimensions: 
<IMG SRC="image.gif" WIDTH=10% HEIGHT=6%> 
You can also mix percentage and pixel values: 
<IMG SRC="image.gif" WIDTH=10% HEIGHT=10> 
Now if we could only scale the text as a percentage of the window size...


Home Web Design Programming Fairlight CMI Soap Box Downloads Links Biography About... Site Map

Site Map Send comments about this site to Greg at gregh@ghservices.com
All pages copyright © 1996-1999 GH Services™   Created 1996/10/01   Last updated 1999/09/30
All trademarks contained herein are the property of their respective owners