View Full Version : image help please

03-18-2005, 05:45 AM
this is my code, and it works great. But now, when the picture changes, the select and buttons move around with it. Is there a way to postion the bottom of the image so that the select and buttons dont move?

function doChange(opt){
var selobj=document.getElementById("piclist");
var idx=selobj.selectedIndex;
if(opt=="back" && idx!=0) idx--;
if(opt=="next" && idx!=selobj.options.length-1) idx++;
return true;

<BODY background="swab.gif" link="maroon"><center>

<p><img id="mypic" src="pic1.jpg"></p>
<input type="button" value="back" onclick='doChange("back")'>

<SELECT id="piclist" onchange='doChange("selected")'>
<option value="pic1.jpg" id="picture 1">Pic1</option>
<option value="pic2.jpg" id="picture 2">Pic2</option>
<option value="pic3.jpg" id="picture 3">Pic3</option>
<option value="whole_world.gif" id="the globe">Globe</option>
<option value="http://www.iflta.org/images/2003_poster_contest_winner.jpg" id="2003 winner">Winner</option>
<input type="button" value="next" onclick='doChange("next")'>
<p><a href='javascript:window.close();'>Close Window</a></p>


03-18-2005, 06:14 AM
Specify the height of the largest image as the height of the container of the image.

<div style="height:100px"><img id="mypic" src="pic1.jpg"></div>

But you will have big space for small images. Why not just put the image below the buttons?

03-18-2005, 12:33 PM
actually that's what i was looking for to an extent... is there a way for the image to be positioned at the bottom and grow up instead of being at the top and growing down?(its not really growing, its just that the height is getting bigger

03-18-2005, 10:59 PM
does anyone know?

03-21-2005, 04:19 AM
is there a way for the image to be positioned at the bottom and grow up instead of being at the top and growing down?
Just put the image tag at the bottom of the page.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum