Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-12-2011, 12:35 AM   PM User | #1
azizalmudhaf
New to the CF scene

 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
azizalmudhaf is an unknown quantity at this point
Question 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:

www.11by8.com

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:

www.11by8.com/test.html

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:

www.11by8.com/test2.html


Could someone please guide me on which solution would be best to fix the problem, and implement the effect I have in mind?

-Aziz
azizalmudhaf is offline   Reply With Quote
Old 11-12-2011, 01:28 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello azizalmudhaf,
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.

...
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:06 PM.


Advertisement
Log in to turn off these ads.