I have 2 images on a site. They are background images that are called up through the style sheet. I need to add links to these images. What is the code to do that? Here is the current CSS code: #f01{background: url(../images/f01.png) no-repeat 0 0;position:absolute;left:0;top:0;width:159px;height:79px;} #f02{background: url(../images/f02.png) no-repeat 0 0;position:absolute;right:0;top:0;width:146px;height:79px;} Code (markup): Thanks, J
btw you might wana put a quote around the urls (ie: url('../images/f02.png')) Also not sure how you mean link the css, if the image has an id of #f01 <img src="..." id="#f01" ...> you would wrap <a href="..."> </a> around it to make a link. Code (markup): If they are backgrounds, then you need to make it a background of an object that can be wraped with an anchor. Or... you can make links themselves have backgrounds, for example an anchor with an id of f00. #foo { text-indent: -9999px; display: block; width: 159px; height: 79px; background: url(../images/f01.png) no-repeat 0 0;position:absolute;left:0;top:0; } <a href="yadayada" id="f00">Some text that won't be seen</a> Code (markup): Essentially what has been created is what appears to be a clickable image.
I want to have a link to other pages. If they were just normal images in the page I could do that, but I don't know what the CSS code is to turn them from images into images that link to another page when you click on them.
I edited my post right when you replied. CSS has no properties for "link" by the way, its a style sheet.