2013-04-26 75 views
0

我們在asp.net c#visual studio 2010中製作了我們網站的主頁。 它在safari,opera,chrome,firefox和IE10中表現完美,但IE9顯示了一個大菜單和內容之間的白色塊。在主頁中顯示爲白色div只在IE9中

當我們推F12並檢查元素時,它會突出顯示其中包含所有內容的表單(這樣做的目的是在其他頁面上更多的表示形式runat = server不再需要,因爲不止一個運行在服務器上的表單會給出錯誤)。

這是鏈接到網站:http://iwtsw.ehb.be/~iris.vdz/Index.aspx

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MainLayout.master.cs" Inherits="MainLayout" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html> 
<head id="Head1" runat="server"> 
    <title>Website Euroquip</title> 
    <link href="~/Styles/MainLayout.css" type="text/css" rel="Stylesheet" /> 
    <link href="~/Styles/brlnsr.ttf" /> 
    <link rel="shortcut icon" href="images/flavicons/favicon.ico"> 
    <link rel="icon" type="image/gif" href="images/flavicons/animated_favicon1.gif"> 
    <asp:ContentPlaceHolder ID="head" runat="server"> 
    </asp:ContentPlaceHolder> 
    <script type="text/javascript" src="js/jquery-1.9.1.js"></script> 
    <script> 

     function setBodyContentMinHeight() { 
      var height = $("#leftContent").height(); 
      $('#bodyContent').css('min-height', (height-25) + "px"); 
     } 

     $(function() { 
      setBodyContentMinHeight(); 
      var $sidebar = $("#leftContent"), 
      $window = $(window), 
      offset = $sidebar.offset(), 
      topPadding = 15; 

      $window.scroll(function() { 

       if ($window.scrollTop() > offset.top) { 
        $sidebar.stop().animate({ 
         marginTop: $window.scrollTop() - offset.top + topPadding 
        }); 
       } else { 
        $sidebar.stop().animate({ 
         marginTop: 0 
        }); 
       } 
      }); 


     }); 
</script> 
</head> 
<body> 
<form id="Form1" runat="server"> 
    <div id="wrapper"> 
     <div id="HeaderContent" class="centeredContent"> 
      <a href="Index.aspx" id="logoDiv"> 
       <img src="images/logo.png" alt="logo euroquip" style="height: 146px" /> 
      </a> 
      <div id="menuDiv"> 
       <asp:Menu ID="headMenu" runat="server" DataSourceID="SiteMapDataSource1" 
        Orientation="Horizontal" StaticDisplayLevels="2" StaticEnableDefaultPopOutImage="false" 
        StaticSubMenuIndent="16px" CssClass="headMenu" Font-Names="brlnsr" 
        meta:resourcekey="headMenuResource1" MaximumDynamicDisplayLevels="0"> 
        <LevelMenuItemStyles> 
        <asp:MenuItemStyle CssClass="menu"/> 
        <asp:MenuItemStyle CssClass="menu"/> 
        </LevelMenuItemStyles> 
       </asp:Menu> 
       <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" /> 


      </div> 

      <div id="languagesDiv" class="styled-select shadow"> 
         <form id="ddlLanguage" action="" method="post"> 
         <asp:DropDownList ID="languages" runat="server" AutoPostBack="True" 
          CssClass="ddlLanguages" 
          onselectedindexchanged="languages_SelectedIndexChanged" 
          meta:resourcekey="languagesResource1"> 
          <asp:ListItem Text="NL" Value="nl" 
           /> 
          <asp:ListItem Text="EN" Value="en" /> 
          <asp:ListItem Text="FR" Value="fr" /> 
         </asp:DropDownList> 
        </form> 
        </div> 

     </div> 

     <div id="bodyContent" class="centeredContent"> 
      <div id="leftContent"> 
       <div id="secondaryMenuDiv" class="roundedFrame shadow blackFrame"> 
        <div id="secondaryMenuDivHeader" runat="server"> 
         <asp:Localize ID="Localize1" runat="server" 
          meta:resourcekey="Localize1Resource1" Text="Wij bieden aan:"></asp:Localize></div> 
           <asp:Panel ID="MenuPanel" runat="server" meta:resourcekey="Panel1Resource1"> 
           </asp:Panel> 
        </div> 
        <div id="Div1" class="roundedFrame shadow blackFrame"> 
        Promoties 
       </div> 
      </div> 
      <div id="rightContent"> 
       <!-- <div id="contentDiv" class="roundedFrame shadow" > --> 
       <div id="contentDiv"> 
        <asp:ContentPlaceHolder ID="ContentHolder" runat="server" > 
         Hier komt de content 
        </asp:ContentPlaceHolder> 
       </div> 
      </div> 



      <div class="clearer"></div> 

     </div> 


     <div id="footerContent"> 
      <div id="footerContentCenter" class="centeredContent"> 
       <div id="sitemapContact" class="sitemapColumn"> 
        <h1><a href="Contact.aspx"><asp:Localize ID="contact" runat="server" meta:resourcekey="contactResource1" 
          Text="CONTACT"></asp:Localize></a></h1> 
        <div class="ColumnContent"> 
        <a href="https://maps.google.be/maps?q=Industriestraat+16+3930+Hamont-Achel&hnear=Industriestraat+16,+3930+Hamont-Achel,+Limburg,+Vlaams+Gewest&gl=be&t=h&z=16&iwloc=A" target="_blank"> 
        <img src="images/icons/world.png"/><p>Industriestraat 16 </br> 
         3930 Hamont-Achel </p> 
        </a> 
        <img src="images/icons/phone.png" /><p>011 80 75 30 (t)</br> 
         011 64 61 82 (f) </p> 
        <a href="mailto:[email protected]"><img src="images/icons/email.png" /><p>[email protected]</p></a> 
        </div> 
       </div> 
       <div id="sitemapNieuwsbrief" class="sitemapColumn"> 
        <a href="#nieuwsbriefEmail" onclick="document.getElementById('nieuwsbriefEmail').focus();"><h1><asp:Localize ID="nieuwsbrief" runat="server" 
          meta:resourcekey="nieuwsbriefResource1" Text="NIEUWSBRIEF"></asp:Localize></h1></a> 
        <div id="toTo"></div> 
        <div class="ColumnContent"> 
        <p> 
         <form id="nieuwsbrief" action="" method="post"> 
          <input id="nieuwsbriefEmail" pattern="[^ @]*@[^ @]*" type="email" placeholder="Email" value="" /> 
          <input id="nieuwsbriefEmailVerzenden" type="submit" value="OK"/> 
         </form> 
        </p> 
        <p> 
         <img src="images/icons/feed.png" /> RSS FEED 
        </p> 
        </div> 
       </div> 
       <div id="sitemapSiteMap" class="sitemapColumn"> 
        <a href="Sitemap.aspx"><h1>SITEMAP</h1></a> 
        <div class="ColumnContent"> 
        </div> 
       </div> 
       <div id="sitemapWebshop" class="sitemapColumn"> 
        <a href="Shop.aspx"><h1>WEBSHOP</h1></a> 
        <div class="ColumnContent"> 
        </div> 
       </div> 
       <div id="copyright"> 
       Copyright &copy;2013 Euroquip 
       </br> 
       Design by Team Kinik. 
       </div> 
       </div> 
     </div> 


    </div> 

     </form> 
</body> 
</html> 

會有人知道我們在做什麼錯在這裏?

謝謝!

+0

你有沒有嘗試刪除從你的MainLayout.css設置身高爲100%的css規則? – 2013-04-26 18:41:55

+0

是的...沒有工作! – 2013-04-26 18:54:02

+0

請不要把這個錯誤的方式,但你有沒有清除你的瀏覽器緩存,我是從經驗講:(:(。 – 2013-04-26 18:58:01

回答

0

在MainLayout.css的第29行刪除height:100%

IE 9有其他瀏覽器正確處理的高度怪癖。

+0

thanxxx!這使我們瘋狂:) – 2013-04-26 19:02:32

0

如果使用Internet Explorer開發人員工具(CSS選項卡)禁用height:100%,則頁面佈局按預期工作。

因此,您應該從您的MainLayout.css中刪除將身高設置爲100%的css規則。

Veel成功ermee!

+1

這是形式高度做的伎倆,而不是身高,但接近;) – 2013-04-26 19:02:53