Is there a way to link the whole body?

Discussion in 'HTML & Website Design' started by podja, Jun 25, 2007.

  1. #1
    Hi,

    I have a splash page on my website, and I want the users to be able to click anywhere inside the body and be linked to the home page.

    How can I do this?

    thanks.
     
    podja, Jun 25, 2007 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    I guess this should work
    <a href="/"><div id="content">content of the body</div></a>
    Code (markup):
    :cool:
     
    Bagi Zoltán, Jun 25, 2007 IP
  3. podja

    podja Peon

    Messages:
    388
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hmmm.

    Well heres the site. http://www.funvid.net/

    I want you to be able to click anywhere on the page, and it would be a link.

    I tried putting a transparent .gif and setting it to 100% width and height, but it only seems to cover half.
     
    podja, Jun 25, 2007 IP
  4. prateek

    prateek Peon

    Messages:
    82
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well try to take a screenshot of the site and save the image
    and then link that image
    if thats what you want..
     
    prateek, Jun 25, 2007 IP
  5. podja

    podja Peon

    Messages:
    388
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    No.

    I want it if anywhere on the webpage is clicked, it links to home.php.
     
    podja, Jun 25, 2007 IP
  6. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This works, but unfortunately, IE doesn't convert the mouse to a finger, even though it links. Odd.

    <html>
    <head>
    <style>
    #body {
    margin:0;
    padding: 0;
    }

    #link {
    margin:0;
    padding: 0;
    width: 100%;
    height: 100%;
    }

    </style>
    </head>
    <body>
    <a href="www.google.com">
    <div id="link"></div></a>
    </body>
    </html>
     
    Arnold9000, Jun 25, 2007 IP
  7. GnomeyNewt

    GnomeyNewt Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #7
    Just add the cursor CSS, I've added it below. You should do both pointer and hand for cross browser compatibility.

     
    GnomeyNewt, Jun 25, 2007 IP
  8. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    There ya go. All set.
     
    Arnold9000, Jun 25, 2007 IP