{ width:792px; height:189px;
background:#ffffff url("../images/header_background.jpg") no-repeat 0 0 }

this css code is linking to an image that is on multiple pages on my website - I need to link this image to another webpage in the website. where and how do I put the code in the link?

I use Dreamweaver and usually I would just put a hotspot on the image and link it, but because the image is coded onto the page I can't put a hotspot on to it!

Say the link is http://www.njsymphony.org/

Please Help!

Alicia

URLs in CSS files are relative to the location of the CSS file. URLs in embedded CSS are relative to the page the CSS is embedded in.

If you want to make sure that you always read the image from the same location, use an absolute link. Either root directory absolute: url("/images/header_background.jpg") or http absolute: url("http://www.njsymphony.org/images/header_background.jpg")

I don't think that is what he means matt.

The easiest way to do it is just to create a completely transparent gif and insert it over the background image in the html and then add the link to this. As far as I know that is the only way to do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.