JavaScript to fix IE problems

Discussion in 'CSS' started by AdamSee, Jul 27, 2007.

  1. #1
    I remember there being a JS file that could fix many of the IE flaws such as the box model hack. Any one know what the file is called?
     
    AdamSee, Jul 27, 2007 IP
  2. veckd

    veckd Peon

    Messages:
    1,065
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    veckd, Jul 27, 2007 IP
    AdamSee likes this.
  3. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #3
    Thanks mate, that's exactly what the doctor ordered. Karma +
     
    AdamSee, Jul 27, 2007 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dean Edwards' IE 7 "library" which is available at http://dean.edwards.name/IE7/ is over 60KB of .htc files that have to be downloaded in order to work - and for dialup users such as myself that's unacceptable.

    Frankly, you shouldn't need to resort to .htc files (or behaviors, expressions and filters for that matter) unless you're fixing .png alpha transparency, :hover support on elements other than anchors, implementing min/max-width/height in IE 5/6 (or dare I say it, fixed positioning, though that can be taken care of without scripting as long as you're careful). That's it.

    IE 5/6 CAN be brought to heel without using hacks in most situations, and in those few situations that they are warranted, the simplified box model hack (below) is usually all that's needed, and then only for IE 5 and 5.5

    Another good tip for avoiding hacking IE is to add padding to a container's descendants, rather than the container itself.

    
    selector {
        width: 200px;    /* width of HTML element */
    }
    
    * html selector {
        width: 220px;   /* value fed to IE 5/5.5 */
        w\idth: 200px;    /* value fed to IE 6 */
    }
    
    Code (markup):
    Just make sure that you're using a complete,valid and proper DOCTYPE to get IE 6 into standards mode (or as close as possible). And if you're using XHTML, don't use an XML encoding or put anything above the DOCTYPE declaration (not even white space).
     
    Dan Schulz, Jul 27, 2007 IP
  5. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #5
    Points well made by Dan, even though I'm not using it for production. Its for prototyping on a key BBC project, where efficient use of time is paramount and ensuring work produced could be easily made into production quality code if need be.
     
    AdamSee, Jul 27, 2007 IP