Results 1 to 3 of 3

Thread: IE won't link an empty div?

  1. #1
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default IE won't link an empty div?

    Why does this code not work in IE?

    <a href="index.php"><div style="position:absolute; height:100px; width:400px; top:0px; left:0px; cursor: pointer; cursor: hand;"></div>
    </a>

    Example:
    http://www.freetoexplorebeauty.co.uk/index.php?

    Making the logo area up top clickable. . .?

    Jen

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    You can insert some temporary text in the div make the text color white. Make sure that the text entered in the div has a overflow: hidden property set and also the text should be filled the div completely.

  3. #3
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there grassmeyer,

    it is not permissible to place block-level elements within inline elements.

    Instead, do it like this...
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    a {
        display:block;
        width:419px;
        height:99px;
        background-image:url(http://www.freetoexplorebeauty.co.uk/skins/free2ex/images/logo.gif);
     }
    </style>
    
    </head>
    <body>
    
    <div>
    <a href="index.php"></a>
    </div>
    
    </body>
    </html>
    coothead
    Last edited by coothead; 09-26-2007 at 11:17 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •