Jump to content

completely overlap images


XpertWorlock

Recommended Posts

I have one image and I have one semi transparent image.

 

Both are in a table, how do I have the semi transparent image completely overlap the other image, both are the same size.

 

echo '<DIV STYLE="{z-index:1;}; position:relative">
<img src="./images/fullimage.png" height="100px" width="100px"></div>';

echo '<DIV STYLE="{z-index:2;}; position:absolute">
<img src="./images/transparentimage.png' height="100px" width="100px"></div>';

 

As you see, I'm heading in the right direction with div's, but I am confused.

 

Remember these are both in a table cell

 

any help is appreciated  ;D

 

Link to comment
Share on other sites

Trying to get it so second div is positioned within the cell no matter where the table is located on page.

 

ex.  If table is at bottom of screen, the second div shouldn't care and position itself within the table, not the screen.

 

Hope this helps

 

 

 

 

<?php 


/*Trying to get it so second div is positioned within the cell no matter where the table is located on page*/

echo "<br><br>";


echo "<table border='1'><tr><td>";

echo "
<DIV STYLE=\"z-index:1; position:relative;\">
<img src='http://www.mikesforums.com/game/images/terrain/grass.png'>
</div>";





echo "
<DIV STYLE=\"z-index:2; position:absolute; top:50; left:50;\">
<img src='http://www.mikesforums.com/game/images/units/soldier_east.png'>
</div>";

echo "</td></tr></table>";

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.