How to adjust image in HTML layout?

liunx

Guest
All,<br />
<br />
I need help please.<br />
<br />
I created an HTML page with a horizontal nav bar image (gif type). However, this image will not expand to a full width of the browser depending on the resolution mode. <br />
<br />
For example: At 1024x768 resolution mode, the horizontal nav bar occupies the width of the browser. However, at higher resolution, the image will not occupy the whole width of the screen.<br />
<br />
Greatly appreciated if any one has an advice! Thank you!<br />
<br />
-David Han<!--content-->If the image has a width propery set you can change it to 100%. Example:<br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"/myfolder/myimg.gif" height=80 width=100%><br />
<br />
<br />
If your image is placed inside a table the image will expand to the width of the table only. You can set the width of the table to 100% also. Tip: if the width of individual table cells are set also, the cell needs to be 1) the only cell in a row and 2) set to 100%. If other rows contain more cells (e.g. more columns) the rowspan attribute for the cell in which the image is must be set also.<br />
<br />
Example:<br />
<br />
<table cellspacing=0 cellpadding=0 border=0 width=100%><br />
<tr><br />
<td><br />
<img src=http://www.htmlforums.com/archive/index.php/"/myimage.gif" height=80 width=100%><br />
</td><br />
</tr><br />
</table><br />
<br />
or:<br />
<br />
<table cellspacing=0 cellpadding=0 border=0 width=100%><br />
<tr><br />
<td width=100% colspan=3><br />
<img src=http://www.htmlforums.com/archive/index.php/"/myimage.gif" height=80 width=100%><br />
</td><br />
</tr><br />
<tr><br />
<td>Hi</td><br />
<td>GoodBy</td><br />
<td>Welcome</td><br />
</tr><br />
</table><br />
<br />
or:<br />
<br />
<table cellspacing=0 cellpadding=0 border=0 width=100%><br />
<tr><br />
<td width=100%><br />
<img src=http://www.htmlforums.com/archive/index.php/"/myimage.gif" height=80 width=100%><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
Hello<br />
</td><br />
</tr><br />
</table><br />
<br />
<br />
Let us know how you worked out and if more help is needed.<br />
<br />
Tip: if you change the resolution (e.g. from 800x600 to 1028x800 for example) in windows98 sometimes you have to close the browser (or atleast minimize it) and launch it again (or maximize it again) otherwise the old dimensions are kept.<!--content-->Kenneth,<br />
<br />
Thank you for your suggestion! I tried it but I have a problem with the image size when the browser is fully maximize. I tried it using 1280x1024 mode in IE6.0<br />
<br />
Please try this code:<br />
<br />
<html><br />
<body> <br />
<table cellpadding="0" cellspacing="0" width="100%"><br />
<tr><br />
<td><img src=http://www.htmlforums.com/archive/index.php/"nav1.gif" border="0" ></td><br />
<!-- Note: my trail image is nav1.gif as an example --><br />
<td width="100%"><img width="100%" src=http://www.htmlforums.com/archive/index.php/"nav1.gif"></td><br />
</tr><br />
</table><br />
</body><br />
</html><br />
<br />
<br />
Your advise is greatly appreciated!<br />
<br />
-David<!--content-->if the iamge is not 1280 in width it wil never go all the way. you have to make the iamge that big to accomplish what you want. you have you monitor set to 1280x1024? man you must have a monitor that is like 32" big. I have a 19" and it is real small I can't even read the text. :P<!--content-->
 
Back
Top