Jump to content

Recommended Posts

an easy way to get a link in there if you have your header as a background image is to overlay a transparent gif with a link on it within the container

 

<div id="headerPan">
<a href="http://www.link.com"><img src="transparent.gif" width="100" height="100" /></a>
</div>

 

#headerPan{
   width:778px; margin:0 auto 0 auto; background:url(images/newheader.jpg) no-repeat; height:343px;
}

 

or alternatively just set your header as a normal image within the div (ie not using background-image)

I see what u mean but i was wondering how to do it in css in my code and not try to just put a transparency over it. I did try that but it kinda screwed up my divs for some reason, how can I give this header a link to like: portfolio.html

 

Here's what i gots

#headerPan{

width:778px; margin:0 auto 0 auto; background:url(images/newheader.jpg) no-repeat; height:343px;

}

 

#headerPan ul{

width:539px; margin:0 0 0 139px; display:block; height:21px;

}

#headerPan ul li{

display:block; float:left; height:21px; margin:0; padding:0;

}

#headerPan ul li a{

font: bold 12px/21px "Trebuchet MS", Arial, Helvetica, sans-serif; padding:0 14px 0 14px; color:#EAEAEA;

background-color:#242424; text-decoration:none; margin:0; height:21px;

}

#headerPan ul li a:hover{

color:#EAEAEA; background-color:#0867C3;

}

It might help if there's a live page we can see that might help us visualize what you're trying to do.

 

Basics are that a background is a background and you can't make anything in the background clickable.  The use of a transparent gif is the simple way to make the background apparently link to something.

 

Then again, maybe what would work for you is the old reliable image map.

Thanks Andy, I agree. The example is: http://www.designzillas.com - the top header image has the "view gallery" on there that I want to take straight to my portfolio. But when I tried adding a transparant gif it screwed up the placement of my Search bar. Thanks again, I appreciate all the help!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.