|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Image Maps in CSS?
Hello. I'm a first time poster and also still wet behind the ears as far as CSS goes. I would like to know if there is a way to insert image map coordinates into a style sheet so I do not have to repeat those image map coordinates on each html page.
Here's my sample that I'm working with: URL So I have one image (which I know I have to put on the html page, because CSS only allows background images), and then all these hotspots on the image that form the map + coordinates. If there is a way to put all those coordinates over into an external style sheet, I'll be ... ecstatic. If there's not a way, then I'll abandon this idea and move on! Much thanks in advance, san antone rose |
|
#2
|
||||
|
||||
|
CSS Image Maps
Once again, a list apart comes to the rescue.
http://www.alistapart.com/articles/imagemap/ You can have CSS imagemaps by having defined areas which are links of fixed size. This shows a quick setup (background represents image, and borders outline link areas), which I tested in Mozilla 0.8, IE6, and Opera 7. PHP Code:
Last edited by NotGoddess : July 23rd, 2004 at 09:03 PM. Reason: Obsessive need for text to line up properly. |
|
#3
|
|||
|
|||
|
Thanks!
Thanks! That's a great article in A List Apart. I'm guessing then that I could put my image map elements into the style sheet, then link to my javascript rollovers from the style sheet? Or would I be relying too much on externals?
I'm trying to find a balance between coding on html pages v. using external controls (where things can be easily changed) v. accessibility issues. Would anyone else out there recommend using the css image map technique? Thanks so much. san antone rose |
|
#4
|
||||
|
||||
|
Generally, from an accessibility angle, image maps are not a Good Thing™. Mobility impaired folks might have difficulty with a mouse, so you must make tabbed focus very obvious. Visually impaired folks, using most assistive technology UAs, will "see" a linearized version of your page. The image map will be seen as a link to the image map links. Look at your page in Lynx for an idea of what's happening.
My own philosophy is that no essential functionality should depend on client side scripting, images, css, or plug-ins. You can put tartar sauce on the fish, but the fish had better be edible without it. cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
|
#5
|
|||||
|
|||||
|
Quote:
Quote:
(Hint: There are Lynx browsers that will run on Windows, but if you don't have easy access, then use FireFox/Mozilla and view pages with no styling.) Quote:
![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Image Maps in CSS? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|