SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    E-business guru Eirik's Avatar
    Join Date
    Nov 2000
    Location
    Oslo, Norway
    Posts
    413
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Linking a div (a PNG problem)

    Hi guys,

    If there is a more appropriate forum to ask this question, please advise.

    I'm using transparent PNGs on a web site I'm currently developing, and I'm trying to link the PNG images. The only problem is that for the PNGs to appear transparent in IE, I have to use the following code:

    HTML Code:
    <div style="height:100px;width:200px;filterrogidXImageTransform.Microsoft.AlphaImageLoader(src='http://www.nafo.info/design/nafo/images/nafo_logo.png', sizingMethod='scale')" id="" class=""></div>


    ...and I can't figure out any way to link the div. I've tried filling it with a transparent GIF and linking that instead, but it just covers up the PNG. I also tried filling it with non-breaking spaces, but they just appear one pixel tall.

    Any ideas on how I can solve this? Thanks in advance !
    Sincerely,

    Eirik Johansen
    Netmaking AS

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your page online so we can have a look?
    Code:
    <html>
    <head>
    <style type='text/css'>
    body {
      background: #ccc;
    }
    .logo {
      height: 100px;
      width: 200px;
      filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.nafo.info/design/nafo/images/nafo_logo.png', sizingMethod='scale');
    }
    </style>
    </head>
    <body>
    
    <a href='http://www.nafo.info/'><img border='0' src='transparent_1x1.gif' class='logo'></a>
    
    </body>
    </html>

  3. #3
    Woof! Woof! elel1138's Avatar
    Join Date
    Apr 2004
    Location
    Warsaw, Poland
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried "onclick"???
    Leszek Leszczyński
    www.hazelsoft.com
    --- Real programmers don't document. If it was hard to write,
    it should be hard to understand. ---

  4. #4
    E-business guru Eirik's Avatar
    Join Date
    Nov 2000
    Location
    Oslo, Norway
    Posts
    413
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot, guys! The onClick triggger worked like a charm. For others trying to do the same thing; I also added "cursorointer" to the style of the div to make ut show the usual link cursor.
    Sincerely,

    Eirik Johansen
    Netmaking AS


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
  •