Image maps within <table>

Discussion in 'HTML' started by helpneeded, Apr 23, 2007.

  1. helpneeded

    helpneeded Guest

    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
     
    helpneeded, Apr 23, 2007
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed helpneeded <>
    writing in news::

    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Apr 23, 2007
    #2
    1. Advertising

  3. helpneeded

    Andy Dingley Guest

    On 23 Apr, 05:44, helpneeded <> wrote:

    > 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.
    <img> is OK for this, <table> isn't (it depends too much on the
    effects of text size) and so doesn't support usemap.

    > 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.
     
    Andy Dingley, Apr 23, 2007
    #3
  4. helpneeded

    dorayme Guest

    In article
    <>,
    helpneeded <> wrote:

    > 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)

    --
    dorayme
     
    dorayme, Apr 24, 2007
    #4
  5. helpneeded

    helpneeded Guest

    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 ÔÇÑß ÈÜ:
    > In article
    > <>,
    > helpneeded <> wrote:
    >
    > > 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)
    >
    > --
    > dorayme
     
    helpneeded, Apr 24, 2007
    #5
  6. helpneeded

    Bergamot Guest

    helpneeded wrote:
    >
    > 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

    --
    Berg
     
    Bergamot, Apr 24, 2007
    #6
  7. helpneeded

    Bergamot Guest

    Bergamot, Apr 24, 2007
    #7
  8. helpneeded

    dorayme Guest

    In article <>,
    Bergamot <> wrote:

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

    >
    > 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.

    --
    dorayme
     
    dorayme, Apr 24, 2007
    #8
  9. helpneeded

    dorayme Guest

    In article
    <>,
    dorayme <> wrote:

    > In article <>,
    > Bergamot <> wrote:
    >
    > > dorayme wrote:
    > > >
    > > > <http://members.optushome.com.au/droovies/test/imgMapTable/table.h
    > > > tml>

    > >
    > > 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.


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

    --
    dorayme
     
    dorayme, Apr 24, 2007
    #9
  10. helpneeded

    dorayme Guest

    > 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.

    --
    dorayme
     
    dorayme, Apr 25, 2007
    #10
  11. helpneeded

    Bergamot Guest

    dorayme wrote:
    >> No... you are right, I was not thinking, it is all wrong!

    >
    > 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.

    --
    Berg
     
    Bergamot, Apr 25, 2007
    #11
  12. helpneeded

    dorayme Guest

    In article <>,
    Bergamot <> wrote:

    > dorayme wrote:
    > >> No... you are right, I was not thinking, it is all wrong!

    > >
    > > 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.


    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.)

    --
    dorayme
     
    dorayme, Apr 26, 2007
    #12
  13. helpneeded

    Bergamot Guest

    dorayme wrote:
    >
    > 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.

    --
    Berg
     
    Bergamot, Apr 26, 2007
    #13
  14. helpneeded

    dorayme Guest

    In article <>,
    Bergamot <> wrote:

    > dorayme wrote:
    > >
    > > 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.


    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.

    --
    dorayme
     
    dorayme, Apr 26, 2007
    #14
  15. helpneeded

    Bergamot Guest

    dorayme wrote:
    > In article <>,
    > Bergamot <> wrote:
    >
    >> dorayme wrote:
    >> >
    >> > 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.

    >
    > 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.

    --
    Berg
     
    Bergamot, Apr 27, 2007
    #15
  16. helpneeded

    dorayme Guest

    In article <>,
    Bergamot <> wrote:

    > dorayme wrote:
    > > In article <>,
    > > Bergamot <> wrote:
    > >
    > >> dorayme wrote:
    > >> >
    > >> > 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.

    > >
    > > 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.


    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".

    --
    dorayme
     
    dorayme, Apr 27, 2007
    #16
  17. helpneeded

    Bergamot Guest

    dorayme wrote:
    >
    > 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.

    --
    Berg
     
    Bergamot, Apr 27, 2007
    #17
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Vaughn

    GDI+ and Image Maps

    Kevin Vaughn, Jul 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    Kevin Vaughn
    Jul 11, 2003
  2. Sean Jorden
    Replies:
    1
    Views:
    617
    laurie
    Aug 19, 2003
  3. Simon Elliott
    Replies:
    4
    Views:
    1,179
    Simon Elliott
    Mar 10, 2005
  4. Marcus
    Replies:
    2
    Views:
    610
    Marcus
    Dec 9, 2005
  5. DaWinner2011
    Replies:
    0
    Views:
    571
    DaWinner2011
    Aug 3, 2011
Loading...

Share This Page