Q695 Posted July 11, 2009 Share Posted July 11, 2009 I want the delete button to float on top of the item button, how would I do it? if ($item_id!=0){ global $con; $sql="SELECT * FROM item WHERE id='$item_id'"; $result=@mysql_query($sql,$con) or die(death($sql)); if($item=mysql_fetch_array($result)){ echo "<a href='?page=transfer&item=$item_id'><img src='images/items/$item[image]' width='100' height='100' border='0'></a> "; } if ($tag){ echo"<div><img src='images/red_x.jpg' width='20' height='20' alt='delete' style='z-index:1'/></div>"; } } } Link to comment https://forums.phpfreaks.com/topic/165637-solved-layering-images-delete-item-button/ Share on other sites More sharing options...
Q695 Posted July 12, 2009 Author Share Posted July 12, 2009 Any ideas? Link to comment https://forums.phpfreaks.com/topic/165637-solved-layering-images-delete-item-button/#findComment-873877 Share on other sites More sharing options...
littlevisuals Posted July 12, 2009 Share Posted July 12, 2009 Is this any good? if ($item_id!=0){ global $con; $sql="SELECT * FROM item WHERE id='$item_id'"; $result=@mysql_query($sql,$con) or die(death($sql)); if($item=mysql_fetch_array($result)){ echo "<a href='?page=transfer&item=$item_id'><img src='images/items/$item[image]' width='100' height='100' border='0'></a> "; } if ($tag){ echo"<div><img src='images/red_x.jpg' width='20' height='20' alt='delete' style='margin-top:-20px'/></div>"; } } } Add z-index to display on top. Link to comment https://forums.phpfreaks.com/topic/165637-solved-layering-images-delete-item-button/#findComment-874017 Share on other sites More sharing options...
Q695 Posted July 12, 2009 Author Share Posted July 12, 2009 Yes, it did. Thanks, now I need to make sure that clicking it will only do one of the hyperlinks, not both of them. Link to comment https://forums.phpfreaks.com/topic/165637-solved-layering-images-delete-item-button/#findComment-874108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.