即使內容超出頁面下方,我asp.net網頁右側的垂直滾動條總是灰顯。Asp.net網頁不會垂直滾動
我認爲它與html css類有關,但我不確定。我嘗試了許多不同的變化,但沒有運氣。我從Visual Studio開始使用IE8。
HTML
{
overflow: ??
}
我使用的是母版頁瓦特/內容佔位符。像這樣:
<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="SummaryView.aspx.cs" Inherits="Reports.SummaryView" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<link href="Style/Layout.css" rel="stylesheet" type="text/css" />
<div id="PlanInfo" runat="server" style="float:right; height:200px; width:720px; margin-left:20px;" ></div>
<br />
<div id="UserInfo" runat="server" style="float:right; height:200px; width:720px; margin-left:20px;" ></div>
<br />
<div id="SummaryInfo" runat="server" style="float:right; height:200px; width:720px; margin-left:20px;" ></div>
</asp:Content>
編輯
我想這可能是相關的CSS部分(在我的母版頁)
#form1
{
overflow:visible;
height: 999px;
width: 1152px;
position: fixed;
top: 12px;
left: 6px;
}
發佈您認爲會導致問題的完整CSS將是一個明智的想法。我的第一個直覺是'overflow'設置不正確。 – 2011-04-26 17:15:27
如果我在#form1部分設置了overflow:auto,那麼我的窗體上會出現一個滾動條,但那不是頁面最右邊的文檔的html滾動條。 – 2011-04-26 17:23:52
哪些元素在其上設置了「溢出」屬性?看起來像'#form1'這樣的'overflow:visible;'似乎是一種權宜之計,可以緩解其他地方的「overflow:hidden;」之類的「症狀」。 – 2011-04-26 17:27:00