Western Union - Remortgages - Life Insurance - Cheap Car Insurance - Stag Weekend Nottingham

PDA

View Full Version : Best way to Link a Header Image


THT
Jun 27th 2006, 11:49 am
Sounds simple I know...

ive always done my header images as background images via css and not but using an <img Blah /? tag

Now, it occured to me that people are clicking the header image to get to the index (basic mistake i know)

Now whats the best and valid XHTML way to do this?

Do i have to revert to the img tag?
I tried using a <div> inside an <a> as a quick fix but that wasnt valid...

any ideas?

jestep
Jun 27th 2006, 12:22 pm
You could try making a link that has a block display type.

<style>
a.hdr {
display:block;
width:700px;
height:100px;
background: url(myimage.jpg) top left no-repeat;
}
</style>
<a href="index.php" class="hdr"></a>

THT
Jun 27th 2006, 12:32 pm
perfect :)
thanks

M-Moody
Aug 15th 2006, 12:23 am
Smart and perfect man,
thanks alot