File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to use html tag <area> if the image is background image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to use html tag <area> if the image is background image" Watch "how to use html tag <area> if the image is background image" New topic
Author

how to use html tag <area> if the image is background image

david arnold
Ranch Hand

Joined: Apr 10, 2009
Posts: 133
Hi,

I have a background image on jsp login page which defined in css


Now I want part of the area of the image could be clicked, and I found this <area> tag which works fine together with <img> tag. Example:



But my problem is that the image work as background, even if I put it in jsp file instead of css, it will be like
, if I could not define the <img> tag, then I could not use <map> tag to associate with the <img>tag, right? Then I could not define the <area> tag.

Thanks for the help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62276
    
  68

No can do. A background is just a background. If you want it to be clickable, don't make it a background.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
david arnold
Ranch Hand

Joined: Apr 10, 2009
Posts: 133
I see. Thank you Bear for the info.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62276
    
  68

If you need layered elements you could investigate using absolute and relative positioning to place an image element behind other elements.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to use html tag <area> if the image is background image