⬆️ ⬇️

3 medicines for Donkey

The great (by market share) creation of Microsoft - the Internet Explorer browser before version 7 has a lot of flaws, among which modern web designers and developers are the most tense:



These problems should be solved if all IE users move to version 7. For those who do not want to wait, I present the three best cures for these browser ailments.

Two of the three solutions are “HTML components” (.htc), one is based on JavaScript + .htc. Other HTC browsers do not understand, and nothing bad happens. JavaScript is connected via conditional comment.

HTC does not work if the user has banned the execution of ActiveX on pages. The script can also be disabled. In addition, there is a natural limit on the version number - not older than IE 5.5. So there will always be users whom your improvements will not help - but what really to take from such “poor”!

Turn on the pseudo-class “: hover” - whatever: hover by Peter Nederlof



Website : http://www.xs4all.nl/~peterned/csshover.html

Demo : http://www.xs4all.nl/~peterned/examples/cssmenu.html

File : http://www.xs4all.nl/~peterned/htc/csshover.htc

IE understands this pseudo-class only for the tag A. It is not clear where this restriction comes from, but the production of pop-up menus and other “mouse-sensitive” special effects is therefore unfairly difficult.

Apply whatever: hover is easy:

  1. Download the file, add it, for example, in the folder / css /
  2. In the style of the HTML page we write

    body{

    behavior: url(/css/csshover.htc);

    }


After that, the pseudo-class “: hover” can be safely used.

You can read about the limitations of use (they exist, but they have not been met in my practice) on the site.

There is also the second version of this HTC ( http://www.xs4all.nl/~peterned/htc/csshover2.htc ), but the innovation there is not so necessary, with even greater restrictions, so I prefer the first version (which continues develop).

Making Translucent PNGs - IE PNG Fix by Angus Turnbull



Website : http://www.twinhelix.com/css/iepngfix/

Demo : http://www.twinhelix.com/css/iepngfix/demo/

File : http://www.twinhelix.com/css/iepngfix/iepngfix.zip

PNG allows you to use an eight-bit alpha channel, but what's the use of it if the Donkey shows translucent areas on a gray background!

Many solutions to this problem concerned only the IMG tag or just the element background. IE PNG Fix allows you not to sweat on both occasions. So, we apply :

  1. Download the file
  2. We register it in css, for example:

    img, div {behavior: url(iepngfix.htc)}

    or even

    * {behavior: url(iepngfix.htc)}


Restrictions relate to background images - they will not be repeated (background-repeat: no-repeat), positioned (background-position: *) - also, since the background is still placed through the filter, we are simply facilitated by its use.

All at once - IE7 by Dean Edwards



Website : http://dean.edwards.name/IE7/

Demo : http://dean.edwards.name/IE7/compatibility/Pure%20CSS%20Menus.html

File : http://downloads.sourceforge.net/ie7/IE7_0_9.zip?modtime=1124553772&big_mirror=0

This library not only provides the ability to use PNGs in IE 5 and 6, but also includes CSS2 selectors (including: hover), max / min-width / height CSS properties, “position: fixed” and does many more useful things.

IE is now compatible with standards, hacks and workarounds are a thing of the past, the author claims. I recommend to take statements and try :

  1. Download the file
  2. In the <head> of the page, but after the META content-type, we write:

    <!--[if lt IE 7]> <script src="/ie7/ie7-standard-p.js" type="text/javascript"> </script> <![endif]-->


There are many limitations . Improvements in CSS do not apply to styles written directly into tags (inline styles, style = "*"). If the structure of the document is changed by the script, you must subsequently call document.recalc (). You can work in JavaScript with the className and runtimeStyle properties only within the framework of the methods proposed by the author ( http://dean.edwards.name/IE7/caveats/ ).


')

Source: https://habr.com/ru/post/13067/



All Articles