foxe Posted August 10, 2007 Share Posted August 10, 2007 Hello, i know this isn´t php but the site i´m coding is php. well, i´ve got some problems with imagemap. this is my css: area.pictureopacity img { filter:alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0; } area.pictureopacity:hover img { filter:alpha(opacity=50); -moz-opacity: 0.5; opacity: 0.5; } and here is the php function: <?php function showImage($image) { $prev = "img1.jpg"; $next = "img3.jpg"; $path = "gallery/".$image; list($imgWidth, $imgHeight, $type, $attr) = getimagesize($path); $onethird = $imgWidth / 3; $twothirds = $onethird * 2; echo " <map name='picture'> <area class='pictureopacity' shape='rect' coords='1,1,".$onethird.",".$imgHeight."' href='index.php?image=".$prev."'> <area class='pictureopacity' shape='rect' coords='".$twothirds.",1,".$imgWidth.",".$imgHeight."' href='index.php?image=".$next."' > </map> <center><img src='".$path."' usemap='#picture' style='border:1px solid black;'></center> "; } ?> so how can i use the css opacity in imagemap? i want 50% opacity when i hover the two areas. please help! Quote Link to comment https://forums.phpfreaks.com/topic/64259-imagemap/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.