nalan — 2011-09-22T06:07:30-04:00 — #1
I am new to CSS. I’m having a problem with the background image. Infact I used 2 images for the background and I need to make the second image as link (ONLY THE SECOND IMAGE). I have tried lot of methods, but it makes both images as link, but i need only the second image to be a link (href). Here is the css :
background-color : #000000;
background-position: 5px center, 775px center;
Any help please…….
paulob — 2011-09-22T07:33:16-04:00 — #2
You would need to position an empty anchor over the image to make this work which means you would be better of applying the second image to an anchor instead and placing it into position.
The only other way assuming #header is already an anchor would be to place an element over the part that you don't want to be a link and block it off but again you are adding extra elements to do this.
if #header is a wrapper and not the anchor itself then you could use :after to construct a box to sit on top of the part that shouldn't be a link but then again that would assume that you have an inner anchor element so there is no point as the anchor could already be used.
You will have to clarify the html to get a straight answer
nalan — 2011-09-22T08:27:51-04:00 — #3
Thanks for ur reply. I'll give a try and let u know.