473,725 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image map area tag background image

I am trying to implement an image map (in this particular case a
country map) with few <area ...>s on it.
The challenge is to add background image (dot) to each <areaso it
will display over the image map.
I am failing miserably at that.
Anybody tried to do that before?
Anybody succeeded?
Jun 27 '08 #1
4 14650
Scripsit GArlington:
The challenge is to add background image (dot) to each <areaso it
will display over the image map.
Won't work. By the specs, you can set background properties for an area
element, as for any element. In practice, they'll be ignored.

So you need to define the goal more exactly, so that alternative
approaches could be suggested. In particular, "why" is a good question.
And do you really expect a _background_ image display _over_ an image
map?

You can set a background for the entire image, making the background
image itself different in different areas of the foreground image. I
don't know why you would do that, but the whole idea looks odd to me. If
this approach wouldn't work, why not?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #2
In article
<d3************ *************** *******@f63g200 0hsf.googlegrou ps.com>,
GArlington <ga********@tis cali.co.ukwrote :
I am trying to implement an image map (in this particular case a
country map) with few <area ...>s on it.
The challenge is to add background image (dot) to each <areaso it
will display over the image map.
I am failing miserably at that.
Anybody tried to do that before?
Anybody succeeded?
I don't know what you are doing exactly but you can do things with JS. A
dot?

<http://netweaver.com.a u/alt/slices/map_strict_bloc k.html>

Which does not change bgs but this sort of thing can easily be adapted.

--
dorayme
Jun 27 '08 #3
On Jun 5, 5:39 pm, "Jukka K. Korpela" <jkorp...@cs.tu t.fiwrote:
Scripsit GArlington:
The challenge is to add background image (dot) to each <areaso it
will display over the image map.

Won't work. By the specs, you can set background properties for an area
element, as for any element. In practice, they'll be ignored.
That is what I suspected from my attempts to make it work...
>
So you need to define the goal more exactly, so that alternative
approaches could be suggested. In particular, "why" is a good question.
And do you really expect a _background_ image display _over_ an image
map?
The goal was to create a dynamic country map with dots and clickable
<areaelements for each office, these <area.
Until recently the country map was created as an image WITH dots for
each office and <areaelements were created separately taking
coordinates of each office from DB. I was hoping that it would be
possible to include the dot for each <areathus saving the
inconvenience of re-uploading the map every time the new office is
added - and yes, it happens fairly often - I had to do it three times
in the last year and it has to go through testing every time to make
sure that coordinates and dots on the image go together...
>
You can set a background for the entire image, making the background
image itself different in different areas of the foreground image. I
don't know why you would do that, but the whole idea looks odd to me. If
this approach wouldn't work, why not?

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
I am not sure who (it was before my time) came up with the idea of
using imagemap for this purpose here, it looks like I will end up
using good old clickable images instead...
Jun 27 '08 #4
Scripsit GArlington:
The goal was to create a dynamic country map with dots and clickable
<areaelements for each office, these <area.
I see. This might have some added value as compared with just a simple
list of links, especially if it is not evident what the areas are. E.g.,
several small countries might have grouped into one area, and it would
be useful to a user to see at a glance which are his country belongs to.
But this is a simple image map issue and need not involve CSS at all.
Until recently the country map was created as an image WITH dots for
each office and <areaelements were created separately taking
coordinates of each office from DB.
I'm not sure whether I can follow this. But anyway, you can have a
background image with a country map and a foreground (content) image
that is transparent except for some dots. Once you have the images, the
styling is rather trivial. The <mapelement must be referred to by a
foreground image (specified by an <imgelement's src attribute), but it
does not really "know" what the image itself is. The <areaelements
specify geometric patterns inside a rectangle, and the actual image is
technically independent of this, though of course crucial to the human
eye, which only sees the actual image and not the area specifications.
I was hoping that it would be
possible to include the dot for each <areathus saving the
inconvenience of re-uploading the map every time the new office is
added - and yes, it happens fairly often - I had to do it three times
in the last year and it has to go through testing every time to make
sure that coordinates and dots on the image go together...
I see. But the <areaelements specify abstract shapes only, not image
data.

On the other hand, you could overlay several images, using CSS. I first
experimented with the idea of a normal imagemap, with other images (each
corresponding to one dot) laid over it. This would take place so that a
<divis relatively positioned, with several img elements inside it, all
"absolutely " positioned (i.e., positioned relatively to the enclosing
<div>), with different z-index values. However, browsers seems to treat
the situation so that when the topmost (largest z-index) image is not
the one referencing the <mapelement, it effectively turns into a
passive area in the map.

Back to the drawing board. Let's create an image containing just the
dots, otherwise transparent, and refer to it in the <mapelement. Then
make the real map image a background image of that image. Something like

<img id="countries" src="dots.gif" style="backgrou nd:
url(countries.g if)"
usemap="#areas" >

Oddly enough, or maybe not so oddly, this seems to work.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
15697
by: Imran | last post by:
Hi, I am attempting to create a CSS-driven website, in that I want to be able to control the display/content from the CSS file. I do not want to use tables. On a page, I have a background image (that contains smaller images) and I would like to assign the smaller images as hyperlinks. What is the best way to do this? I know I can use an imagemap, but is
1
3305
by: RJ | last post by:
Hello! I am trying to lay out a left navigation column with a background image, where the left nav column runs the entire scrolled height/length of the page. The float:left column layout works fine, but the background image doesn't continue downward in this column below the links. I tried this in FireFox 1.0.7 and IE6, but this image stops where the last link stops. I want the background all the way to the bottom. How can I force...
7
2622
by: Georges Bessis | last post by:
The image I set as background are left at original size. In a picturebox, I can decide to strech the image. Can I do that to fill my background ? Regards GB
8
3938
by: Warren Post | last post by:
At <http://snow.prohosting.com/srcopan/dry/test.es.html>, you will see that the background image runs down the left margin. The right hand side of it is faded, watermark style, but it is one single image. my intention is for the header and text to appear to the right of the unfaded portion of the image, and on top of the watermarked portion. At most viewport widths it works as intended. However, if the viewport is narrowed enough to...
1
3911
by: alokw | last post by:
Hi everyone, Here's my problem. I'd like to revamp my web site, and I have this idea. I want to create essentially a border around the screen of about 100 pixels of just black. Heres where it gets tricky: In the middle area which is not touched by the border should be an image that I have created that is excessively
1
3146
by: rsteph | last post by:
I've got some product information pages, with images and text, all setup within a table. I'm trying to add a small image in the upper right hand corner of the content div (where all the important information is). I've got the product name at the top, left aligned and typically as a two lined header, and I'd like to add a small logo to the right of that, either right beside it, or in the far right corner. could anyone help me with how to set...
1
19671
by: swc76801 | last post by:
I desperately need help. My understanding of CSS is non-existent. I have a store http://astore.amazon.com/texasheat-20 with Amazon.com. According to the information from Amazon.com "Write your own overriding CSS to customize your aStore." Their setup page is divided into two sections. On the right they show the existing CSS. On the left there is a box where you can add the new code. They have tabs for "Global", "Category Page", "Detail Page",...
5
4654
by: studentofknowledge | last post by:
hi guys im new to javascript and need some guidence please.. im trying to display a 400x400 pixel coloured area in the middle of a webpage that stays in the middle with a browser window resize. Within the area, i would like to display an image and some text, overriding a few words with an inline style. i would like the image to change once the mouse is placed over it. and when the mouse is removed from the image the image should...
0
2705
by: ton | last post by:
Hi, I have an Image which is dark grey/black, at the top a white line, at the left site a white line as well. At 192 px from the left of the screen I position a DIV with this image as the background image. In the code I've added a multi line textbox (in my real world it is a treeview). It is placed that I would have to scroll to see the entire textbox. What happens is that the image will repeat itself, this is what you expect. Because...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.