How to use coordinates in a CSS file?

Soldato
Joined
11 Apr 2004
Posts
19,914
Hi guys,

Just having a shot at creating a HTML page with CSS for the layout and have a question.

I'm using a map with co-ordinates to create separate links without the use of separate images.

The code goes something like this...
Code:
<map name="map">
	<area shape="RECT" COORDS="6,8,113,36" href="hardware/" />
	<area shape="RECT" COORDS="168,8,269,36" href="software/" />
	<area shape="RECT" COORDS="324,8,445,36" href="network/" />
	<area shape="RECT" COORDS="498,8,643,36" href="web/" />
	<area shape="RECT" COORDS="699,8,793,36" href="contact/" />
</map>

What I'm looking to do, is put that into the CSS page (which is indexed at the start of the HTML file) so that when the map is called...
Code:
<img src="menu.gif" border=0 usemap="map"/>
... it looks at the CSS page, rather than having the code for the map on each separate HTML page.

Is this possible?

Cheers.
 
SiriusB, what I wanted to do was instead of having the image map in each separate HTML file, just have it once in the CSS file which would then be called upon on each page load of the HTML.

It wasn't a necessity to have it like that, but I thought it'd be much easier if I wanted to change the menu layout/content :)

Mickey, that's superb. I'm sure I'll be able to get something sorted out of all that code... thanks very much :)
 
Back
Top Bottom