Hi Shin use this css construction and attached file to fix it
<head>
<title></title>
.....
<!--[if lte IE 6]>
  <style type="text/css" media="screen">
   img, div {behavior:url(iepngfix.htc);}
   body {behavior: url(csshover2.htc);}
</style><![endif]-->

second file fix a :hover problem with any element

Best regards, Konstantin


Shin пишет:
Hi all... I am new here.. my name is Shin.

This is my first shot at implementing web standards... used to be a table-criminal :P I've been working on a site and I have a problem with IE 5.5 and IE 6... (another one, yeah)

The site is on : http://www.88keys.ca/2008/index.php

The case is the positioning problem on the index page and the PNG transparency screenshot of index.php in IE 5.5 is here http://i85.photobucket.com/albums/k79/hi-res/msie-55-windows-2000.jpg screenshot of index.php in IE 6 is here http://i85.photobucket.com/albums/k79/hi-res/msie-60-windows-2000.jpg


While the inside page is a bit OK in the positioning matter. Just the transparency. But a real situation occur in IE 5.5, it just doesn't understand JQUERY tab tools I'm using.

example url : http://www.88keys.ca/2008/p_village.php

screenshot of insider page in IE 5.5 is here http://i85.photobucket.com/albums/k79/hi-res/Copyofmsie-55-windows-2000-a25e5d54.jpg

screenshot of insider page in IE 6 is here
http://i85.photobucket.com/albums/k79/hi-res/Copyofmsie-60-windows-2000-b36b41d2.jpg


Please tell me where are my errors on the CSS coding, I know they are.
And how to tackle these problem (the positioning and transparency on IE)

The CSS code is a bit mess, sorry. It's my first attempt.


Thanks all.. in advance..

Shin
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


<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 = 'i/e.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>
<attach event="ondocumentready" handler="parseStylesheets" />
<script>
/**
 *      Whatever:hover - V2.02.060206 - hover, active & focus
 *      ------------------------------------------------------------
 *      (c) 2005 - Peter Nederlof
 *      Peterned - http://www.xs4all.nl/~peterned/
 *      License  - http://creativecommons.org/licenses/LGPL/2.1/
 *
 *      Whatever:hover is free software; you can redistribute it and/or
 *      modify it under the terms of the GNU Lesser General Public
 *      License as published by the Free Software Foundation; either
 *      version 2.1 of the License, or (at your option) any later version.
 *
 *      Whatever:hover is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *      Lesser General Public License for more details.
 *
 *      Credits and thanks to:
 *      Arnoud Berendsen, Martin Reurings, Robert Hanson
 *
 *      howto: body { behavior:url("csshover.htc"); }
 *      ------------------------------------------------------------
 */

var csshoverReg = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ 
]+)+)):(hover|active))|((a|input|textarea)([#.][^ ]+)?:unknown)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
        onhover:{on:'onmouseover', off:'onmouseout'},
        onactive:{on:'onmousedown', off:'onmouseup'},
        onunknown:{on:'onfocus', off:'onblur'}
}

function parseStylesheets() {
        if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
        window.attachEvent('onunload', unhookHoverEvents);
        var sheets = doc.styleSheets, l = sheets.length;
        for(var i=0; i<l; i++) 
                parseStylesheet(sheets[i]);
}
        function parseStylesheet(sheet) {
                if(sheet.imports) {
                        try {
                                var imports = sheet.imports, l = imports.length;
                                for(var i=0; i<l; i++) 
parseStylesheet(sheet.imports[i]);
                        } catch(securityException){}
                }

                try {
                        var rules = (currentSheet = sheet).rules, l = 
rules.length;
                        for(var j=0; j<l; j++) parseCSSRule(rules[j]);
                } catch(securityException){}
        }

        function parseCSSRule(rule) {
                var select = rule.selectorText, style = rule.style.cssText;
                if(!csshoverReg.test(select) || !style) return;
                
                var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
                var newSelect = 
select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
                var className = 
(/\.([a-z0-9_-]*on(hover|active|unknown))/i).exec(newSelect)[1];
                var affected = select.replace(/:(hover|active|unknown).*$/, '');
                var elements = getElementsBySelect(affected);
                if(elements.length == 0) return;

                currentSheet.addRule(newSelect, style);
                for(var i=0; i<elements.length; i++)
                        new HoverElement(elements[i], className, 
activators[pseudo]);
        }

function HoverElement(node, className, events) {
        if(!node.hovers) node.hovers = {};
        if(node.hovers[className]) return;
        node.hovers[className] = true;
        hookHoverEvent(node, events.on, function() { node.className += ' ' + 
className; });
        hookHoverEvent(node, events.off, function() { node.className = 
node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
        function hookHoverEvent(node, type, handler) {
                node.attachEvent(type, handler);
                hoverEvents[hoverEvents.length] = { 
                        node:node, type:type, handler:handler 
                };
        }

        function unhookHoverEvents() {
                for(var e,i=0; i<hoverEvents.length; i++) {
                        e = hoverEvents[i]; 
                        e.node.detachEvent(e.type, e.handler);
                }
        }

function getElementsBySelect(rule) {
        var parts, nodes = [doc];
        parts = rule.split(' ');
        for(var i=0; i<parts.length; i++) {
                nodes = getSelectedNodes(parts[i], nodes);
        }       return nodes;
}
        function getSelectedNodes(select, elements) {
                var result, node, nodes = [];
                var identify = (/\#([a-z0-9_-]+)/i).exec(select);
                if(identify) {
                        var element = doc.getElementById(identify[1]);
                        return element? [element]:nodes;
                }
                
                var classname = (/\.([a-z0-9_-]+)/i).exec(select);
                var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
                var classReg = classname? new RegExp('\\b' + classname[1] + 
'\\b'):false;
                for(var i=0; i<elements.length; i++) {
                        result = tagName? 
elements[i].all.tags(tagName):elements[i].all; 
                        for(var j=0; j<result.length; j++) {
                                node = result[j];
                                if(classReg && !classReg.test(node.className)) 
continue;
                                nodes[nodes.length] = node;
                        }
                }       
                
                return nodes;
        }
</script>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to