开发者

IE 7 crashes and just closes without any message

开发者 https://www.devze.com 2023-02-26 21:57 出处:网络
I am experiencing a very strange problem with Internet Explorer 7. When I open my page it just closes without any error message or something. My whole code works fine in all real browsers and also IE6

I am experiencing a very strange problem with Internet Explorer 7. When I open my page it just closes without any error message or something. My whole code works fine in all real browsers and also IE6, IE8 and IE9. The problem is IE7 specific. It crashes both in IETester and when I just simply run it. I开发者_开发百科 know it's hard to answer with no code provided, but I barely can post my whole project here and, as I said, it works fine even in IE6. So, if some of you have some info (maybe you've experienced smth like that) I'd appreciate it.

UPDATE

As soon as I have found the issue, I am posting HTML and CSS that cause IE7 to crash. Please, note that this is not my actual code, I've created this to experiment only.

<!DOCTYPE html>
    <html>
        <head>
            <title></title>
            <style type="text/css">
                .event_details.interface
                {
                    position: relative;
                    width: 200px;
                    height: 200px;
                    background-color: grey;
                }

                .event_details.interface button
                {
                    position: absolute;
                    top: 0;
                }

                .event_details.interface button[value="save"]
                {
                    right: 25px;
                }

                .event_details.interface button[value="delete"]
                {
                    right: 70px;
                }
            </style>
        </head>

        <body>
            <div class="event_details interface">
                <button type="button" value="save">Save</button>
                <button type="button" value="delete">Delete</button>
            </div>
        </body>

    </html>


I found out what the problem was. It was CSS to cause IE7 (and only) to crash. I had a button element on page with 'value' attribute on it. And in CSS I had:

button[value="save"]
{
    right: 20px;
}

I changed 'value' attribute to 'name' attribute and styled it like:

button[name="save"]
{
    right: 20px;
}

Now it works. Thanks everybody for your answers.


Run your page thru the W3C Markup Validation Service. I use it like a debugger for my HTML page.


Run your page through FireFox. (Open up the WebDeveloper-Error Console first).

Assuming it doesn't also crash FireFox, you should see where and what the errors are.

0

精彩评论

暂无评论...
验证码 换一张
取 消