...

View Full Version : Problems in positioning images



Toegang
08-14-2005, 05:45 PM
In an “onMouseOver” command on a thumbnail I want to put an image into a cell of a table. Because I do not know how and I saw these codes

<style type='text/css'>
.images
{
position:absolute;
top:191;
left:63;
}
<style>

and

<div id="fig1" class="images"> <img src="fig1.jpg"> </div>

I did it that way. But ... now it depends on the way a visitor looks at the window frame full-size or not, etc.

How can I put the image relative to the cell instead of the frame, for the div tag only allows positioning relative to the frame?

chump2877
08-14-2005, 05:51 PM
use:


position:relative;

this allows you to position elements in relation to the <div> or table element that contains it...

Toegang
08-14-2005, 06:23 PM
Unfortunately the relative-command doesn´t work. Now all the enlarged pictures are positioned relative to one another and outside i.e. beneath the table.

Perhaps it matters where the div-tag is put in the page but when I put it in the same cell as the thumbnail it disapeared completely!

mark87
08-14-2005, 07:48 PM
Link to the page or show the whole code. :)

Toegang
08-15-2005, 01:32 PM
Thanks for looking into my problem. Meanwhile I received a solution on a other forum.

Position an "empty" placeholder:


<img src="empty name="_show" border="0" / >

Here you put your thumbnails:



<img src="thumbnail_1.jpg" border="0" onMouseOver="document.images['_show'].src='pic_1.jpg'" / >
<img src="thumbnail_2.jpg" border="0" onMouseOver="document.images['_show'].src='pic_2.jpg'" / >
etc.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum