Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    PNG trasparenti, AlphaImageLoader e link non cliccabili

    Applicando la tecnica AlphaImageLoader per visualizzare la trasparenza delle immagini png su IE i link presenti nei contenitori che usano questa dichiarazione non sono raggiungibili ma ne in rete ne sul forum ho trovato soluzioni al mio problema.

    Non uso javascript perchè le png sono inserite nei background degli elementi.

    Qualcuno sa come ovviare?
    Arjuna

    finding solutions

  2. #2
    Devi dare un "position:relative" ai 'contenitori che usano quella dichiarazione'.

    cià
    ale
    If you can keep your head when all about you are losing theirs,
    it's just possible you haven't grasped the situation.

  3. #3
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    position: relative al link
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

  4. #4
    Scusate il ritardo....
    sto cercando anche io di far funzionare png 24 applicati come background ai tag[*] di un menu.
    sto utilizzando
    codice:
    <public:component>
    <public:attach event="onpropertychange" onevent="doFix()" />
    
    <script type="text/javascript">
    
    // IE5.5+ PNG Alpha Fix v1.0RC4
    // (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
    
    // This is licensed under the CC-GNU LGPL, version 2.1 or later.
    // For details, see: http://creativecommons.org/licenses/LGPL/2.1/
    
    
    // This must be a path to a blank image. That's all the configuration you need.
    if (typeof blankImg == 'undefined') var blankImg = 'pxt.gif';
    
    
    var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
    
    function filt(s, m)
    {
     if (filters[f])
     {
      filters[f].enabled = s ? true : false;
      if (s) with (filters[f]) { src = s; sizingMethod = m }
     }
     else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
    }
    
    function doFix()
    {
     // Assume IE7 is OK.
     if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
      (event && !/(background|src)/.test(event.propertyName))) return;
    
     var bgImg = currentStyle.backgroundImage || style.backgroundImage;
    
     if (tagName == 'IMG')
     {
      if ((/\.png$/i).test(src))
      {
       if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
        style.width = offsetWidth + 'px';
       filt(src, 'scale');
       src = blankImg;
      }
      else if (src.indexOf(blankImg) < 0) filt();
     }
     else if (bgImg && bgImg != 'none')
     {
      if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
      {
       var s = RegExp.$1;
       if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
        style.width = offsetWidth + 'px';
       style.backgroundImage = 'none';
       filt(s, 'crop');
       // IE link fix.
       for (var n = 0; n < childNodes.length; n++)
        if (childNodes[n].style) childNodes[n].style.position = 'relative';
      }
      else filt();
     }
    }
    
    doFix();
    
    </script>
    </public:component>
    Le immagini png sono visualizzate ma i link non sono cliccabili.
    Ho provato a dare il position relative in vari modi:
    *html #nav a {position:relative;}
    *html #nav ul li a {position:relative;}
    *html #nav li a{position:relative;}
    Da qualche parte ho letto che serve anche lo z-index ma i link continuano a non essere cliccabili (ed espandibili dato che sono su due livelli).
    Con firefox, ovviamente, nessun problema.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.