Positioning links over Images

Discussion in 'HTML & Website Design' started by warsome, Mar 22, 2008.

  1. #1
    Alright, if you go to gmarcade.com (Not my site,) you will notice that the links are positioned over an image. My question is, how do I achieve that?
     
    warsome, Mar 22, 2008 IP
  2. yangyang

    yangyang Banned

    Messages:
    757
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just implement the image as a background under the text links.

    
    <div style="background:#fff url(someimage.gif) no-repeat">
    <a href="#">blahblah</a>
    </div>
    
    Code (markup):
     
    yangyang, Mar 22, 2008 IP
  3. BernardBlack

    BernardBlack Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    They've done it by using the img tag, for example:

    <a href="#"><img src="imagename.jpg" width="50" height="50" border="0"></a>
    Code (markup):
    However you can also achieve it by using the css code yangyang provided.
     
    BernardBlack, Mar 22, 2008 IP
  4. warsome

    warsome Guest

    Messages:
    500
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I know how to make an image a link. But he has the navigation buttons over it.

    Yangyang- How do I position the buttoms around the image, then?
     
    warsome, Mar 22, 2008 IP
  5. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #5
    <a href="#" style="display:block;height:[image_height]px;width:[image_width]px;line-height:[image_height]px;background-image:url(imagename.png)">The text></a>
    Code (markup):
     
    blueparukia, Mar 22, 2008 IP
  6. yangyang

    yangyang Banned

    Messages:
    757
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Their html and css is a mess so I'll just try my own way.

    You can do this with relative or absolute positioning, and probably z-index.
     
    yangyang, Mar 23, 2008 IP