Skip to content

Problems with JS vertical alignment #392

@prettydiff

Description

@prettydiff
d(function () {
            var a = c.createElement("div"),
                b = c.getElementsByTagName("body")[0];
            if (b) {
                a.style.width = a.style.paddingLeft = "1px",
                b.appendChild(a),
                d.boxModel = d.support.boxModel = a.offsetWidth === 2,
                "zoom" in a.style && (a.style.display = "inline", a.style.zoom = 1, d.support.inlineBlockNeedsLayout = a.offsetWidth === 2, a.style.display = "", a.innerHTML = "<div style='width:4px;'></div>", d.support.shrinkWrapBlocks = a.offsetWidth !== 2),
                a.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></tab" +
                        "le>";
                var e = a.getElementsByTagName("td");
                d.support.reliableHiddenOffsets = e[0].offsetHeight === 0,
                e[0].style.display              = "",
                e[1].style.display              = "none",
                d.support.reliableHiddenOffsets = d.support.reliableHiddenOffsets && e[0].offsetHeight === 0,
                a.innerHTML                     = "",
                b
                    .removeChild(a)
                    .style
                    .display = "none",
                a            = e = null;
            }
        });

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions