2014-06-20 174 views
0

這個jsp主頁在Mozilla和IE 7中正常工作,但沒有在Chrome中。沒有選擇任何圖像。請指教。Chrome瀏覽器兼容性問題

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
    <!-- Libraries to include jstl tags --> 
        <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
    <!-- Libraries to include jstl tags --> 
        <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
    <!-- Libraries to include jstl tags --> 
        <!DOCTYPE HTML> 
        <html> 
        <head> 

        <% 
        String ua=request.getHeader("User-Agent").toLowerCase(); 
       // condition used for mobile compatibility  
       if(ua.matches("(?i).*((android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hipt)) //Many such conditions are checked but I removed them to make it simple 
      { 
         response.sendRedirect("index?source=mobile"); 
         return; 
        } 
        %> 

        <title>Arizona Health Sciences Library EBM Search Engine</title> 
        <link rel="stylesheet" type="text/css" href="css/style_index.css" > -- included css 

        </head> 
        <body> 
     <!-- Images that are not getting loaded --> 
     <a href="http://arizona.edu"><img src="images/ua_logo_white.png" height="80" /></a> 
     <div class="floatright"> 
     <!-- Images that are not getting loaded --> 
     <a href="http://ahsl.arizona.edu/home"><img src="images/AHSL.png" height="80" width="100" /></a> 
     </div> 

     <!-- Links to different search engines --> 
     <h2><a href="search?module=2">General Medicine</a></h2> 
     <h2><a href="search?module=1">Emergency Medicine</a></h2> 
     <h2><a href="search?module=3">Medical Imaging</a></h2> 
     <h2><a href="search?module=4">Pediatrics</a></h2> 
     <h2><a href="search?module=5">Surgery/Critical Care</a></h2> 
     <!-- Static texts hard coded - Need to be replaced --> 

     <footer> 
     All content ©2012 Arizona Board of Regents. All rights reserved. 
     </footer> 

     </body> 
        </html> 

style_index.css - 這是用於此頁面的CSS。我不確定是否需要對此樣式表進行更改。

body { 
    font-family: 'Myriad Pro', Arial, Helvetica, sans-serif; 
    } 

body { 

    background: url('../images/bg_top_repeat_dark_blue.jpg') repeat-x #f3f3f3; 

    } 

image 
{ 
    border-width: 0; 
} 

#wrapper { 
    width: 800px; 
    margin: 100px auto; 
    } 

#logo { 
    height: 397px; 
    text-indent: -10000px; 
    margin-bottom: -135px; 
    } 
#logo.blank { 
    text-indent: 0; 
    } 


h1 { 
    padding-top: 80px; 
    color: #202080; 
    font-size: 36px; 
    font-weight: bold; 
    text-align: center; 
    white-space: nowrap; 
    } 

h2 { 
    color: #202080; 
    font-size: 30px; 
    font-weight: bold; 
    text-align: left; 
    } 

.floatright 
{ 
    float: right; 
    margin-right: 18px; 
} 

form { 
    background: url('../images/search_box.png') no-repeat; 
    height: 47px; 
    } 

input { 
    background: none; 
    border: none; 
    outline: 0; 
} 

input.text { 
    width: 670px; 
    padding: 13px 0 13px 24px; 
    color: #505050; 
    font-size: 20px; 
    float: left; 
    } 

input.submit { 
    width: 104px; 
    padding: 13px 0 13px 10px; 
    float: right; 
    cursor: pointer; 
    } 
.ui-grid-a .ui-block-a { 
    width: 30%; 
} 

footer { 
    height: 50px; 
    padding: 5px 0 20px 0; 
    text-align: center; 
} 
+0

您是否檢查過Chrome設置?也許重置?嘗試隱身?任何插件運行? (你的標記/ CSS看起來很好)。這是在開發?該頁面是否可以在線訪問? – Jack

+0

我試過所有這些,它沒有工作。我不得不刪除div元素下的幾個類屬性,並設法讓他們工作..謝謝! – Karthikeyan

回答

0

當您在Chrome瀏覽器中打開網頁時,按住f12按鈕。一個窗口將打開。現在在右邊會顯示你的css代碼。用紅色或黃色警告標誌檢查代碼。這些標誌告訴代碼是錯誤的或不需要鉻。

+1

謝謝你的建議..它有助於:) – Karthikeyan