gpt4 book ai didi

html - 填充 ASP 文本框

转载 作者:太空宇宙 更新时间:2023-11-04 04:40:50 25 4
gpt4 key购买 nike

我目前对此有疑问。我的网页右侧有很多多余的填充(http://openset.azurewebsites.net/).I 希望页面适合屏幕。在做了一些调查工作后,我找到了导致它的对象,它是我的 <asp:TextBox/> 在用户输入他们的电子邮件地址。搜索 CSS 后,我找不到任何类型的 TextBox 多余的 padding 属性,我不知道如何更正它。

相关代码是:

<div class="pull">
<asp:TextBox ID="AddEmailName" runat="server" Text="Enter your e-mail here"
onfocus="if(this.value == 'Enter your e-mail here') this.value = '';"
onblur="if(this.value == 'Enter your e-mail here' || this.value == '') this.value = 'Enter your e-mail here';"
style="text-align:center" Width="300px" Font-Size="Large"></asp:TextBox>
<asp:Button ID="AddEmailButton" runat="server" width="100px"
backcolor="#c7b099" forecolor="#000" Text="Notify Me"
OnClick="AddEmailButton_Click" CausesValidation="true" />
</div>

CSS:

.pull {
position: relative;
left: 525px;
}

最佳答案

问题是 left: 525px 移动了 div,但宽度保持在 100%。您应该改用 padding-left: 525pxmargin-left: 525px

关于html - 填充 ASP 文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15497744/

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