Typical Cross-browser Compatibility Pitfalls

What are the most common browser compatibility issues in major desktop browsers?

No duplicates, please. Voting issues you are experiencing. I hope the list will be sorted by itself. "IE sux" is not a mistake, but a call to vote.

[Edit] Yes, I know this is a poll - I do not send answers in this to collect points - I am really interested to know what people usually encounter.

+3
source share
10 answers

Quirksmode contains an exhaustive list of the various differences that need attention! -)

- , , , ...

+1

PNG Internet Explorer 6, , JavaScript-less AlphaImageLoader IE6.

+6

CSS - , - .

, , , .

+4

.

+3

- , firefox .

+2

, IE 6 .

- :

function getOffsetTop (element) {
    var offset = 0;

    if (element.offsetTop)
        offset = offset + element.offsetTop;

    if (element.offsetParent)
        offset = offset + getOffsetTop(element.offsetParent);   

    return offset;
}

, node IE ( ). , , :

function getOffsetTop (element) {
    var offset = 0;

    if (element.offsetTop)
        offset = offset + element.offsetTop;

    var parent = element.offsetParent;
    while (parent) {
        if (parent.offsetTop)
            offset = offset + parent.offsetTop;
        parent = parent.offsetParent;
    }

    return offset;
}
+2

. IE6/7 - Peekabo, guillotine, , escape-floats, 3px gap, , , , ...

+2

, , - , - IE6 . !

, , , - DIV, DIV, IE6, .

, , - :

   +-------------------------------+
   |+------+ +-----------+ +------+|
   ||      | |           | |      ||
   || foo  | |   bar     | | baz  ||
   ||      | |           | |      ||
   ||      | |           | |      ||
   |+------+ +-----------+ +------+|
   +-------------------------------+

:

   +-------------------------------+
   |+--------+ +------------+      |
   ||        | |            |      |
   ||  foo   | |    bar     |      |
   ||        | |            |      |
   ||        | |            |      |
   |+--------+ +------------+      |
   |+------+                       |
   ||      |                       |
   ||      |                       |
   || baz  |                       |
   ||      |                       |
   ||      |                       |
   |+------+                       |
   +-------------------------------+
+1

XMLHttpRequest 'onreadystatechange' XMLHttpRequest.responseText , Firefox, IE (, , Safari).

.

0

, , , .. "margin: 0 auto" , div, - IE6, "". .

0

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


All Articles