Results 1 to 10 of 10

Thread: Image map troubles

  1. #1
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Image map troubles

    So I have an image map for my navigation. The actual code only looks at a 900x45 transparent image (I am using skins on my site). But for some reason, half of support is not linked. Here is the code for the image map.

    HTML Code:
    <img 
    
    	src="http://www.cyanideperfection.net/styles/pad.gif" 
    	width="800" height="40" 
    	usemap="#navmap">
    
    <map 
    	id="navmap" 
    	name="navmap">
    
    <area 
    	shape="rect" 
    	coords="0,0,135,45" 
    	alt="Home"
    	href="http://cyanideperfection.net/index.php">
    
    <area 
    	shape="rect" 
    	coords="140,0,300,45" 
    	alt="Visitor"
    	href="http://cyanideperfection.net/visitor/index.php">
    
    <area 
    	shape="rect" 
    	coords="310,0,450,45" 
    	alt="Photo Gallery"
    	href="http://cyanideperfection.net/pixelpost/index.php">
    
    <area 
    	shape="rect" 
    	coords="470,0,690,45" 
    	alt="Contact"
    	href="http://cyanideperfection.net/contact.php">
    
    <area 
    	shape="rect" 
    	coords="700,0,1000,45" 
    	alt="Support"
    	href="http://cyanideperfection.net/support/index.php">
    
    </map>
    However, as you can see by going to http://cyanideperfection.net/ the last bit of it doesn't get mapped. Can someone help?
    Last edited by lord_havoc; 04-16-2007 at 02:58 AM. Reason: Incorrect URL

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It seems fine on some pages but not on others. Make sure the width dimension is large enough on all pages to make the transparent image extend all the way to the right end of the map. Also, in an unrelated matter, make sure the image is available to, and its src attribute coded correctly on, all pages using it.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yeah, the problem has been corrected. I had forgotten to change the width to 900 from 800 when I made the image larger.

    Regarding other pages, that is because I have a different heading page for those where the image map was correct.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It would be better to use separate images rather than an image map (have I already said this? I've a touch of d&#232;ja vu).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    It would be better to use separate images rather than an image map (have I already said this? I've a touch of dèja vu).
    I'm not too sure about that, certainly simpler with the map when skinning.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Aye, but separate images are more flexible and allow for a fluid design.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well If I use separate images, then the link will be an image... so when the user changes stylesheets, the header and text will now be, for example, blue instead of the default green. However that will not change the links from green to blue. With an image map, it links ares of the page to another. Which is ideal b/c the links don't move. I would love to have the images separate, but I don't know how to make it work! If you can properly explain it, I will implement it. Also, as a side note, it is harder to make the words line up horizontally with individual images.
    Last edited by lord_havoc; 04-16-2007 at 10:01 PM. Reason: too vague

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Also, as a side note, it is harder to make the words line up horizontally with individual images.
    Just split your current big image map up into its words.
    Well If I use separate images, then the link will be an image... so when the user changes stylesheets, the header and text will now be, for example, blue instead of the default green. However that will not change the links from green to blue.
    The ideal solution would be to have the words written in transparency on a black PNG. That way, you could just change the background colour of the images with CSS and the text colour would change.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well that makes sense, I never thought of that. But the way these images were made, it is too much trouble to make them transparent. I can't seem to get them transparent easily anyway.

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In the GIMP, it's simply a matter of going to Layer->Transparency->Colour to Alpha. I presume all photo editors will have something similar.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •