DevonNice Posted August 30, 2010 Share Posted August 30, 2010 Can someone help me with something i cant seem to figure out? OK, In viewusers.php Ive created image to go with Attack, Mail, Add to friend, enemies, and all that and what i want it to do is when someone hovers over the image the image will change. I have all the images i just dont know how to make the hover effect. Someone help me? heres the code. print " [url='attack.php?ID={$r['][img=pp/au.png][/url] [url='mailbox.php?action=compose&ID={$r['][img=pp/sm.png][/url] [url='sendcash.php?ID={$r['][img=pp/sc.png][/url] [img=pp/break.png] [url='contactlist.php?action=add&ID={$r['][img=pp/ac.png][/url]"; if($ir['donatordays'] > 0) { print " [url='friendslist.php?action=add&ID={$r['][img=pp/af.png][/url] [url='blacklist.php?action=add&ID={$r['][img=pp/ae.png][/url]"; } Quote Link to comment Share on other sites More sharing options...
BoGFx Posted August 30, 2010 Share Posted August 30, 2010 What do you want the images to change to? New images? Quote Link to comment Share on other sites More sharing options...
Nicholas Posted August 30, 2010 Share Posted August 30, 2010 be something like this wouldnt it? sprry if its wrong, also you have to sort css image thing out, ive tried to mark what to do. print "<style type=text/css> <!-- a.swap1 { background-image:url(normal_attack_image_here1.jpg); } a.swap1:hover { background-image:url(hoved_attack_image_here2.jpg); } a.swap2 { background-image:url(normal_mail_image_here1.jpg); } a.swap2:hover { background-image:url(hoved_mail_image_here2.jpg); } a.swap3 { background-image:url(normal_cash_image_here1.jpg); } a.swap3:hover { background-image:url(hoved_cash_image_here2.jpg); } a.swap4 { background-image:url(normal_contact_add_image_here1.jpg); } a.swap4:hover { background-image:url(hoved_contact_add_image_here2.jpg); } a.swap5 { background-image:url(normal_add_friend_image_here1.jpg); } a.swap5:hover { background-image:url(hoved_add_friend_image_here2.jpg); } a.swap6 { background-image:url(normal_add_enemy_image_here1.jpg); } a.swap6:hover { background-image:url(hoved_add_enemy_image_here2.jpg); } --> </style>"; print " [url='attack.php?ID={$r['][img=pp/au.png][/url] [url='mailbox.php?action=compose&ID={$r['][img=pp/sm.png][/url] [url='sendcash.php?ID={$r['][img=pp/sc.png][/url] [img=pp/break.png] [url='contactlist.php?action=add&ID={$r['][img=pp/ac.png][/url]"; if($ir['donatordays'] > 0) { print " [url='friendslist.php?action=add&ID={$r['][img=pp/af.png][/url] [url='blacklist.php?action=add&ID={$r['][img=pp/ae.png][/url]"; } What do you want the images to change to? New images? also what he said post up the images with the links to them to show us what you want to be normal and what the image to change too once you hover over the normal image. Quote Link to comment Share on other sites More sharing options...
Uridium Posted August 30, 2010 Share Posted August 30, 2010 http://www.dynamicdrive.com goto image effects Quote Link to comment Share on other sites More sharing options...
DevonNice Posted August 30, 2010 Author Share Posted August 30, 2010 http://www.dynamicdrive.com goto image effects Thanks Illusions, it works perfectly! Quote Link to comment Share on other sites More sharing options...
Nicholas Posted August 31, 2010 Share Posted August 31, 2010 can you show me a demontration of how you done your CSS and coding bit please? i dont think my verison would work... Quote Link to comment Share on other sites More sharing options...
DevonNice Posted August 31, 2010 Author Share Posted August 31, 2010 can you show me a demontration of how you done your CSS and coding bit please? i dont think my verison would work... You want me to show you how i did it? Quote Link to comment Share on other sites More sharing options...
Nicholas Posted September 4, 2010 Share Posted September 4, 2010 can you show me a demontration of how you done your CSS and coding bit please? i dont think my verison would work... You want me to show you how i did it? yeh, because im thinking about doing it on my game :P Quote Link to comment Share on other sites More sharing options...
Oo-Savage-oO Posted September 4, 2010 Share Posted September 4, 2010 u can use something like this <a href="link" title="title" onmouseover="document.ken.src='hover image'" onmouseout="document.ken.src='non hover image'"> Simple Quote Link to comment 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.