The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Multiple links on background image
So I’ve been reading up about this on multiple articles but I still can’t seem to figure it out. I want to know how to add multiple links to a background image.
The specific site in question: http://pizzaweekend.com/
I want both sub-images (Pizza Weekend and Weekend Friends) to link to two different URLs.
Any help is appreciated!
I want to know how to add multiple links to a background image.
Firstly, background images can’t have links..they are styling and so are not in the DOM.
Actual images can be inside anchor links so that clicking the image will take you to the href location.
href
For multiple links ON specific areas of an image you need to look at imagemaps and areas
imagemaps
areas
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area
http://www.howtocreate.co.uk/tutorials/html/imagemaps
Since the page in question uses a background image (and very little else)…I can only suggest that you re-think the HTML structure.