Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-12-2011, 01:35 AM #1
- Join Date
- Nov 2011
- Thanked 0 Times in 0 Posts
Image map with hover-over image icons.
Hi guys. I'm trying to achieve an effect of substituting the squares in this logo as icons that link to different projects when you hover over them, and they would turn back to black squares when you hover away from them:
So far I've tried doing hover-changing image icons, and laid them over the base image's top-right four squares by using coordinates:
It's working well on my screen's resolution and it delivers the effect I'm trying to achieve, but the squares go out of place when I zoom in or out of my screen. This also happens when I view the page in other devices such as phones and iPads,
I've tried working with an image map generator (http://www.image-maps.com/) but it didn't quite work with what I wanted, since it replaced the image of the logo with an enlarged image of the icon as soon as I hover over it:
Could someone please guide me on which solution would be best to fix the problem, and implement the effect I have in mind?
11-12-2011, 02:28 AM #2
- Join Date
- Dec 2006
- Thanked 1,845 Times in 1,829 Posts
Invalid code, deprecated <center> tag, mis-using the <br> tag for positioning elements and unpositioned container are all part of your problem.
Instead of putting your image and positioned elements in that <center>, use <div id="wrapper"> and position it relative. That will stop things from moving around.
Check you code in the validator too, that will help you with the other issues. See the links about validation in my signature line below.
A different approach here, I've used this before and liked the end results.