View Full Version : Positioning images

05-29-2007, 03:59 PM

can someone explain to me how I can place 2 images at different locations within a <td> ?

The code without the placement is as follows:

<td valign="middle" align="center" height="210px">

<input type="image" src="images/ships/comms.png" onclick=\"return popup('scripts/comms/comms.php', 'NWcomms')\">

<input type="image" src="images/ships/chat.png" onclick=\"return popup2('chat/chat.php?PilotName={$pilot["PilotName"]}&ColonyName={$colony["ColonyName"]}&ColonyChat={$colony["ColonyChat"]}', 'NWchat')\">

basically the 2 images should be at different positions, sort of like image 1 100px from the top and 25px from the left, while image 2 should be like 175px from the top and 50px from the left.

Any suggestion is appreciated

Mr J
05-30-2007, 02:02 PM
Something on these lines maybe

<table border="1">
<td valign="top" width="275" height="210px">

<div style="position:relative">
<input type="image" src="pic1.jpg" style="position:absolute;left:25px;top:100px">
<input type="image" src="pic2.jpg" style="position:absolute;left:175px;top:50px">