Jump to content

[SOLVED] layering images (delete item button)


Q695

Recommended Posts

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>";
}
}
}

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.

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.