Image maps within <table>

H

helpneeded

Hello
I know how to create image maps using the <img> tag. However, my
problem is I want to use image maps for image inside <table> tag..
i.e. <table background=img usemap="#map1">

Is it possible? How can it be done?

Thanx
 
A

Adrienne Boswell

Hello
I know how to create image maps using the <img> tag. However, my
problem is I want to use image maps for image inside <table> tag..
i.e. <table background=img usemap="#map1">

Is it possible? How can it be done?

Thanx

You are talking about apples and oranges. Tables are for tabular data, and
do not have anything to do with image maps, unless the tabular data IS
image maps. Look into the DIV element instead - as a matter of fact look
into how to stop abuse tables altogether.
 
A

Andy Dingley

I know how to create image maps using the <img> tag.

As I'm sure you know, this involves defining a map and linking it with
the usemap attribute placed on the <img> element. This attribute is
available for <img>, <object> and <input> but not <table>.

The reasoning behind this (AFAIK) is that client-side maps are
strongly pixel-based, and so it's only appropriate and reliable to use
them with elements that also have a robust scaling onto pixel-sizes.
I want to use image maps for image inside <table> tag..

Whenever someone asks "How do I <foo>?" the obvious question (as
usually posted by Jukka) is, "<foo> is crazy. You don't need to do
<foo>. What is the real requirement <bar> that you _must_ do, and
you've already assumed falsely implies that you should solve by using
<foo>?"

So what's your _real_ need here ? Maybe there's a better and simpler
route that avoids the whole issue?

You can of course place multiple <img> in a <table> and give each one
a <map>. Slightly long-winded to code, but entirely plausible.
 
D

dorayme

helpneeded said:
Hello
I know how to create image maps using the <img> tag. However, my
problem is I want to use image maps for image inside <table> tag..
i.e. <table background=img usemap="#map1">

Is it possible? How can it be done?

Thanx

I don't know what you are up to with this but it is possible to
have an image map in a table (in the following example and just
btw, only the "a" goes to an actual place on click):

<http://members.optushome.com.au/droovies/test/imgMapTable/table.h
tml>

The original of this is not in a table, just a simple div if I
recall, but I stuck it in a table for OP who asked question)
 
H

helpneeded

Why I want to do that?

You see, I have an image on which I want to place some controls (like
text box, datagrid, etc). This image also contains buttons (links)
that need to be image mapped. I figured using my own "ingenuity" that
if I used <img> for image mapping, I wouldnt be able to place controls
on the image! Hence I decided to put the image as a background inside
a <table> and place the controls where I want using <tr><td>.

Please tell me a better way of doing this?

dorayme ÔÇÑß ÈÜ:
 
B

Bergamot

helpneeded said:
I have an image on which I want to place some controls (like
text box, datagrid, etc). This image also contains buttons (links)
that need to be image mapped.

You cannot make a background image an image map, only a foreground image.
if I used <img> for image mapping, I wouldnt be able to place controls
on the image!

Yes you can, with a little CSS positioning, but I don't really recommend
it. Image maps are often a bad idea in the first place and I have the
uncomfortable feeling that your case would not be one of the good uses.
Please tell me a better way of doing this?

Please show a mockup of what you are specifically trying to achieve.
There may be another way to go about it altogether, but it's hard to say
without knowing more.

And please don't top-post.
http://web.presby.edu/~nnqadmin/nnq/nquote.html
 
D

dorayme

Bergamot said:
FYI, the alt text there is all wrong.

I was lazy for the example, better would have been "small letter"
perhaps? (I was certainly not going to type the different ones in
then and there for each letter). I also had in mind Adriene's
point on another thread about spruiking in the alt text (which
what some images do) and was idly thinking about the intent of
the "letter-links" which was to go to big letters. Anyway, I was
not asking a question, so my real "korpelian" use was not so
important.

But thank you for drawing my attention to this matter as I might
go see what the heck I did in my lazy way for the real instance
of this image map.
 
D

dorayme

dorayme said:
I was lazy for the example, better would have been "small letter"
perhaps? (I was certainly not going to type the different ones in
then and there for each letter). I also had in mind Adriene's
point on another thread about spruiking in the alt text (which
what some images do) and was idly thinking about the intent of
the "letter-links" which was to go to big letters. Anyway, I was
not asking a question, so my real "korpelian" use was not so
important.

But thank you for drawing my attention to this matter as I might
go see what the heck I did in my lazy way for the real instance
of this image map.

No... you are right, I was not thinking, it is all wrong! And I
was missing point in above.
 
D

dorayme

No... you are right, I was not thinking, it is all wrong! And I
was missing point in above.

No, I am now confused, it is not all wrong. I don't really know
what the point was, and I am going to now give up guessing.
 
B

Bergamot

dorayme said:
No, I am now confused, it is not all wrong. I don't really know
what the point was, and I am going to now give up guessing.

re: image map alt text

Ask yourself: What would the text be for each link if there were no
image at all?

Having them all the same is just as worthless as using "click here".
Taken out of context, it makes just as much sense.
 
D

dorayme

Bergamot said:
re: image map alt text

Ask yourself: What would the text be for each link if there were no
image at all?

Having them all the same is just as worthless as using "click here".
Taken out of context, it makes just as much sense.

Oh that is your point! Of course, for a public website, of some
chance of being seen, you are right. I never got around to doing
this for the example for the OP which was about (I thought at
least, the relevant bit) being able to put an image map in a
table cell. I just grabbed it from somewhere else I had it, S & R
a few things to strip it down and plonked it on.

I think yesterday I put a bit of alt text for the "a" link (and
had some fun with GREP) as a reminder to myself. I did in fact
ask myself the very question you today suggest and my answer was
to say something informative about where the link was going. If
this is not a good answer, I am always willing to hear better.

(Very btw, Alt text seems constantly interesting a subject.
Remember how recently (another thread) one person was impatient
with having to put in any alt text. I suggested that it was not
hard to set up a GREP S & R to at the very least put in the name
of the src img - better than nothing at all, often containing
clues for the user. I have been thinking lately that there is an
argument for making alt text somehow default to the img src name.
Thus, if an author fails to provide any, it nevertheless appears
as described here. The argument against, of course, is that it
might well make authors too lazy to do the right thing. On
balance I suspect it would be better to have such a default than
not but I am not of any huge conviction in this opinion. By
default, I mean like how tables tbodys appear in the code when
the author has scarcely ever heard or explicitly used such.)
 
B

Bergamot

dorayme said:
I have been thinking lately that there is an
argument for making alt text somehow default to the img src name.

Oh yeah, "spacer.gif" is so useful.

This is generally a very bad idea. Better to have blank alt for a
default, but that is generally a bad idea as well.
 
D

dorayme

Bergamot said:
Oh yeah, "spacer.gif" is so useful.
This is generally a very bad idea. Better to have blank alt for a
default, but that is generally a bad idea as well.

Well, at least I gave some indication of argument for it in the
thread. I do not see any argument for yours. There is a sarcastic
reference to one obviously unimpressive result of my view. But,
of course, sarcasm does not make for a good balance sheet of pros
over cons.
 
B

Bergamot

dorayme said:
Well, at least I gave some indication of argument for it in the
thread. I do not see any argument for yours.

Your arguments on this subject are pretty weak, like your notion that
you can consider just about anything a strange form of tabular data if
you stretch the truth far enough. Sorry, but I have difficulty taking
you seriously. I probably should have ignored your post, but felt
compelled to remark on that particular statement.
 
D

dorayme

Bergamot said:
Your arguments on this subject are pretty weak, like your notion that
you can consider just about anything a strange form of tabular data if
you stretch the truth far enough.

You do not canvass the issue in any way, so I have no idea of
what you consider to be the important considerations in this
matter. A sure sign of bluster is irrelevant considerations in
another thread and personal attacks. What is it with you? Is it
so hard for you to be articulate about a suggestion made in good
faith?

I do not have a strong view on this issue of default, I tend to
think some clue is better than none in the event of a lazy author
and so tended to come down on the side of alt text defaulting to
the name of the image. So far I have had a personal attack on me
from you and a sarcastic remark about "spacer.gif".
 
B

Bergamot

dorayme said:
You do not canvass the issue in any way, so I have no idea of
what you consider to be the important considerations in this
matter.

I have no desire to debate with you on the issue of alt text.
So far I have had a personal attack on me
from you

It was intended as an attack on your ideas, but I see that it could
easily have been taken personally. I'll try to remember to choose my
words more carefully next time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top