I'm trying to make a web page that only has content within the page itself. The page itself should not have scrollbars (although individual parts should have scrollbars). 我希望它看起来与Java API在这里的布局非常相似,
http://java.sun.com/javase/6/docs/api/
,但没有框架。
页面还需要能够动态加载内容。
Right now, I'm trying to get it to work with the ASP !UpdatePanel for the dynamically loaded content and a div for the sizing and panel display, but the panels never cover the screen. For example, I'll have:
<body style="height: 100%; margin: 0; padding: 0;">
<form id="form1" runat="server">
<div style="width: 100%; height: 100%;">
<div style="overflow: auto; height: 100%; border-style: groove; border-width: medium;">
<asp:UpdatePanel ID="TOC" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Panel ID="Display" Height="100%" ScrollBars="Auto" runat="server" />
</ContentTemplate>
</asp>
</div>
</div>
</form>
</body>
But this doesn't cover the entire height of the panel. The width is fine. But it creates a small border at the top of the page, then this expands when content gets filled in on a button press. Then the border changes. I'd much prefer the border remain static.
有什么办法可以用沙发床吗?
EDIT: I just tried this in Firefox and it worked perfectly (excluding the .NET specific things since I was on Linux without the ability to create ASP.NET pages). I need this to work with Internet Explorer 7 though (and probably Internet Explorer 6 too). Is there any neat hack around IE7 completely ignoring the css height property?