1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Best way to Link a Header Image

Discussion in 'HTML & Website Design' started by THT, Jun 27, 2006.

  1. #1
    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?
     
    THT, Jun 27, 2006 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    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>
    
    Code (markup):
     
    jestep, Jun 27, 2006 IP
    THT likes this.
  3. THT

    THT Peon

    Messages:
    686
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    perfect :)
    thanks
     
    THT, Jun 27, 2006 IP
  4. M-Moody

    M-Moody Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Smart and perfect man,
    thanks alot
     
    M-Moody, Aug 15, 2006 IP