Problem having 2 images as background

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 :

#header {
height: 34px;
background-color : #000000;
position: relative;
background-image:url(…/images/BARRE_GALACTIQUE_PICTOS_Carte.png), url(…/images/rechercher.png);
background-position: 5px center, 775px center;

Any help please…….


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 :slight_smile:

hi paul,

Thanks for ur reply. I’ll give a try and let u know.