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
https://forums.phpfreaks.com/topic/135990-completely-overlap-images/
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>";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.