Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Member Deek Fracott's Avatar
    Join Date
    Sep 2012
    Location
    Clarksville, TN
    Posts
    31
    Member #
    33091
    its here.

    On left side, a little hard-coded property search menu.

    works fine in ff/ch . ie = broke . where to reformat?

    Thanks!!

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    The li:hover attribute doesn't work in IE. Personally, this is why I never use CSS tiered menus...they're flaky.

    If you want to fix it in most cases, you're going to have to add a Javascript version of it. That would be the best way. I use jQuery for things like this.
    Deek Fracott likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member Deek Fracott's Avatar
    Join Date
    Sep 2012
    Location
    Clarksville, TN
    Posts
    31
    Member #
    33091
    is there an official online petition somewhere to either: torpedo IE or protest nonstandards?

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    If there was, every browser would be destroyed on some level or another. The problem is that IE is always the first target when it's not always the one that's wrong. In this case it is, but there are cases where IE handles something correctly (e.g. certain margins and padding) and one of the others screws up.
    Deek Fracott likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Quote Originally Posted by TheGAME1264, post: 244886
    The li:hover attribute doesn't work in IE. Personally, this is why I never use CSS tiered menus...they're flaky.
    Wow. Never had probs with that.
    Quote Originally Posted by TheGAME1264, post: 244892
    If there was, every browser would be destroyed on some level or another. The problem is that IE is always the first target when it's not always the one that's wrong. In this case it is, but there are cases where IE handles something correctly (e.g. certain margins and padding) and one of the others screws up.
    IE5 box model is a good example.
    Deek Fracott likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  7. #6
    Member Deek Fracott's Avatar
    Join Date
    Sep 2012
    Location
    Clarksville, TN
    Posts
    31
    Member #
    33091
    okay, so I dug into my file collection b/c I knew ive seen this done before in ie before.
    I came across some fancy pantsy cssmenubar code that i got from ccanyon or somewhere, and it was working in ie, so I checked it out.

    In the head tag, it had something like:
    Code:
    <!--[if IE 6]>
    <link rel="stylesheet" href="ie/ie6.css" type="text/css" media="screen" />
    <![endif]-->
    ...and in ie6.css :
    Code:
    body {
        behavior: url("ie/csshover3.htc");
    ...and finally in csshover3.htc:
    Code:
    <public:attach event="ondocumentready" onevent="CSSHover()" />
    <script>
    /**
    * Whatever:hover - V3.11
    * http://www.xs4all.nl/~peterned/
    *
    * Copyright (c) 2009 Peter Nederlof
    * Licensed under the LGPL license
    * http://creativecommons.org/licenses/LGPL/2.1
    */
    window.CSSHover=(function(){var m=/(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i;var n=/(.*?)\:(hover|active|focus)/i;var o=/[^:]+:([a-z\-]+).*/i;var p=/(\.([a-z0-9_\-]+):[a-z]+)|(:[a-z]+)/gi;var q=/\.([a-z0-9_\-]*on(hover|active|focus))/i;var s=/msie (5|6|7)/i;var t=/backcompat/i;var u={index:0,list:['text-kashida','text-kashida-space','text-justify'],get:function(){return this.list[(this.index++)%this.list.length]}};var v=function(c){return c.replace(/-(.)/mg,function(a,b){return b.toUpperCase()})};var w={elements:[],callbacks:{},init:function(){if(!s.test(navigator.userAgent)&&!t.test(window.document.compatMode)){return}var a=window.document.styleSheets,l=a.length;for(var i=0;i<l;i++){this.parseStylesheet(a[i])}},parseStylesheet:function(a){if(a.imports){try{var b=a.imports;var l=b.length;for(var i=0;i<l;i++){this.parseStylesheet(a.imports[i])}}catch(securityException){}}try{var c=a.rules;var r=c.length;for(var j=0;j<r;j++){this.parseCSSRule(c[j],a)}}catch(someException){}},parseCSSRule:function(a,b){var c=a.selectorText;if(m.test(c)){var d=a.style.cssText;var e=n.exec(c)[1];var f=c.replace(o,'on$1');var g=c.replace(p,'.$2'+f);var h=q.exec(g)[1];var i=e+h;if(!this.callbacks[i]){var j=u.get();var k=v(j);b.addRule(e,j+':expression(CSSHover(this, "'+f+'", "'+h+'", "'+k+'"))');this.callbacks[i]=true}b.addRule(g,d)}},patch:function(a,b,c,d){try{var f=a.parentNode.currentStyle[d];a.style[d]=f}catch(e){a.runtimeStyle[d]=''}if(!a.csshover){a.csshover=[]}if(!a.csshover[c]){a.csshover[c]=true;var g=new CSSHoverElement(a,b,c);this.elements.push(g)}return b},unload:function(){try{var l=this.elements.length;for(var i=0;i<l;i++){this.elements[i].unload()}this.elements=[];this.callbacks={}}catch(e){}}};var x={onhover:{activator:'onmouseenter',deactivator:'onmouseleave'},onactive:{activator:'onmousedown',deactivator:'onmouseup'},onfocus:{activator:'onfocus',deactivator:'onblur'}};function CSSHoverElement(a,b,c){this.node=a;this.type=b;var d=new RegExp('(^|\\s)'+c+'(\\s|$)','g');this.activator=function(){a.className+=' '+c};this.deactivator=function(){a.className=a.className.replace(d,' ')};a.attachEvent(x[b].activator,this.activator);a.attachEvent(x[b].deactivator,this.deactivator)}CSSHoverElement.prototype={unload:function(){this.node.detachEvent(x[this.type].activator,this.activator);this.node.detachEvent(x[this.type].deactivator,this.deactivator);this.activator=null;this.deactivator=null;this.node=null;this.type=null}};window.attachEvent('onbeforeunload',function(){w.unload()});return function(a,b,c,d){if(a){return w.patch(a,b,c,d)}else{w.init()}}})();
    </script>
    Okay, so - if ie6+ , it sources the csshover3.htc file which appears to be a JS Hack that hardcodes the 'hover' function.

    So my point/questions are these:

    1. is this JS solution a light and viable option to fix my problem? will it cause problems in the future (liek w/ SEO/SERPs ?)

    If you want to fix it in most cases, you're going to have to add a Javascript version of it. That would be the best way. I use jQuery for things like this.
    2. Is this JQuery JS or regular old JS? Is there one you would recommend instead of this one?

    3. Is this a "onesizefitsall" hover code fix? ...or does it seem like that .htc js is tailored and would only work with a specific cssmenubar? (I cant read JS very well, but it doesnt seem to have any reference to anyspecific layout other than a general hover function)

    thanks.

  8. #7
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    1) It shouldn't, because it applies specifically to IE6 and doesn't alter any of your code.
    2) Regular JS. I have a jQuery function I've written for this purpose.
    3) According to the docs, it applies the hover selector to any HTML element. So it should work on anything...in theory.
    Deek Fracott likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  9. #8
    Member Deek Fracott's Avatar
    Join Date
    Sep 2012
    Location
    Clarksville, TN
    Posts
    31
    Member #
    33091
    cool. thanks. do you sell your custom functions?

  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    No, mostly because they're for my own evil purposes. But you can use them if you want. Hang on...I'll PM you.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com