gpt4 book ai didi

c# - 粘性页脚确实与需要滚动的页面上的文本重叠

转载 作者:行者123 更新时间:2023-11-28 13:45:53 25 4
gpt4 key购买 nike

我有一个带有以下 CSS 的粘性页脚:

<style type="text/css">

.HeaderTBL
{
width: 100%;
height: 35px;
min-width:960px;
max-width:100%;
background-color: #333333;
}

.FooterTBL
{
width: 100%;
min-width:960px;
max-width:100%;
position:inherit;
bottom:0;
}

.Footer
{
position:absolute;
height: 25px;
bottom:0;
width:100%;
}

</style>

我的代码如下:

<body style="margin: 0;">
<form id="form1" runat="server">
<asp:ScriptManager ID="MasterSM" runat="server">
</asp:ScriptManager>
<table class="HeaderTBL">
<tr>
<td width="75%">
&nbsp;</td>
<td width="25%" align="right">
<asp:TextBox ID="SearchTB" runat="server"
ToolTip="Search"
Width="216px" Height="25px" ForeColor="#333333" BorderColor="White"
BorderStyle="None" Font-Names="Candara" Font-Overline="False"
Font-Size="Medium"></asp:TextBox>

<asp:RoundedCornersExtender ID="SearchTBRCE" runat="server" Enabled="True"
TargetControlID="SearchTB" BorderColor="White">
</asp:RoundedCornersExtender>

</td>
</tr>
</table>

<table align="center" width="960px" style="min-height:100%;">
<tr>
<td width="150px" align="center" valign="top">
<asp:Image ID="LogoIMG" runat="server" Height="150px" ImageAlign="Left"
ImageUrl="~/Images/Logo.gif" Width="150px" />
</td>
<td width="810px" rowspan="2" align="center" valign="top">
<asp:ContentPlaceHolder ID="Body" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td width="150px" align="center" valign="top">
<asp:Label ID="LoginLBL" runat="server" Text="Login"></asp:Label>
</td>
</tr>
</table>

<div class="Footer">
<table class="FooterTBL" style="bottom: 100%">
<tr>
<td align="center"

style="font-family: Candara; font-size: medium; border-top-style: solid; border-top-width: medium; border-top-color: #333333; color: #333333;">
Test Text</td>
</tr>
</table>
</div>
</form>
</body>

但出于某种原因,当我的内容页面(这是我的母版页)上的文本长于页面高度时,页脚保持在其位置并且不会移动到文本正文下方。

任何人都可以提醒我发生了什么事以及任何解决方法吗?

最佳答案

这是因为您正在使用 position: absolutebottom: 0 告诉页脚始终位于屏幕底部,无论如何。如果你想让它在内容之后流动,set position: relative

关于c# - 粘性页脚确实与需要滚动的页面上的文本重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11882165/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com