Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    92
    Thanks
    4
    Thanked 1 Time in 1 Post

    Positioning images

    Hello,

    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')\">
    </td>

    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

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Something on these lines maybe

    <table border="1">
    <tr>
    <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">
    </div>

    </td>
    </tr>
    </table>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •