2012-07-10 184 views
2

我的網站樣式表正在被我測試過的每個瀏覽器忽略。在IE9上測試時出現這個錯誤 - SEC7113:由於MIME類型不匹配,CSS被忽略由於MIME類型不匹配,CSS被忽略

這裏是引用它的頭的html。讓我知道你是否需要更多。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
    <head runat="server"> 
    <title></title> 

    <!--The style sheet below is the one being ignored--> 
    <link rel="stylesheet" type="text/css" charset="UTF-8" href="Styles/Site.css" /> 

    <!-- Skin CSS file --> 
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/skin.css" /> 
    <!-- Utility Dependencies --> 
    <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
    <script src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script> 
    <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> 
    <script src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js">  </script> 
    <script src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script> 
    <script src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script> 
    <!-- Source file for Rich Text Editor--> 
    <script src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"></script> 
    <script src="http://yui.yahooapis.com/2.9.0/build/editor/simpleeditor-min.js"></script> 


</head> 
+0

這是你的個人服務?它可能不是用正確的MIME類型發送CSS文件。 – TheZ 2012-07-10 19:46:48

+0

你的服務器是什麼?你能改變[.htaccess文件](http://wiki.joyent.com/display/gen/Configuring+MIME+Types+in+.htaccess)嗎? – 2012-07-10 19:46:48

+1

嘗試將絕對路徑改爲相對 – debianek 2012-07-10 19:47:18

回答

7

我明白了,我剛剛開始工作的公司未能在設置我的計算機時爲IIS安裝靜態內容功能。所以它忽略了我所有的樣式表,圖像和鏈接。

0

您的服務器顯然發送錯誤的媒體類型信息。雖然這不能從服務器外部驗證。

0

我在文件名中輸入了一個拼寫錯誤,並且在鏈接和文件中拼寫了myFile.ccs和myFile.css。 Firefox很好,但是IE返回了這個錯誤。