IE7 ignores CSS attribute selector only on pages coming from production server

前端 未结 7 713
粉色の甜心
粉色の甜心 2021-02-07 03:25

On my website, IE7 seems to be ignoring certain CSS attribute selectors. The strange thing is that it only happens when the page comes from the production server. If I have the

7条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 03:51

    Be aware that certain conditions can force Internet Explorer to display pages in a document compatibility mode different from the one specified in the webpage. These include, but are not limited to, the following situations:

    • Compatibility View is enabled for the page.

    • The page is loaded in the Intranet zone and Internet Explorer is configured to use Compatibility View for pages loaded from the Intranet zone.

    • Internet Explorer is configured to display all websites in Compatibility View.

    • Internet Explorer is configured to use the Compatibility View List, which specifies a set of websites that are always displayed in Compatibility View.

    • The Developer Tools are used to override the settings specified in the webpage.

    • The webpage encountered a page layout error and Internet Explorer is configured to automatically recover from such errors by reopening the page in Compatibility View.

    Source: http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx

    From this we can derive your running a site on your local intranet, ie 7 can't turn off this of the rendering as in ie8 you can stop local intranet sites being rendering in compat mode.

    10.x.x.x ip address production server

    file:// essentially local host

    http:// through your local server

    UPDATE:

    Okay apologies IE has numerous problems running on the intranet, IE8+ is the issue above as you mentioned IE7 doesn't use compat mode it has quirks and standard. Knowing microsoft though they may have messed it up in one of the ie7 patch updates but I hate assumptions so if someone knows please let me know.

    To resolve the issue I am afraid I can't give you a software level solution or a hardware change. If its always going to be an intranet site then I recommended upgrading network browsers to ie8 minimum.

    I do have a html, css fix however(i know this is not what you want):

     
    
     
        IE display test 
        
         
     
     
        

    It doesn't seem to like [type="buttons"] using display:block;.

提交回复
热议问题