2013-03-19 124 views
0

我目前有一個問題。在我的網頁右側有很多多餘的填充(http://openset.azurewebsites.net/).I希望頁面適合在屏幕上。在做了一些調查工作之後,我發現了引起它的對象,並且它是我的<asp:TextBox/>,其中用戶輸入。他們的電子郵件地址搜索CSS後,我無法找到任何形式的多餘padding屬性的文本框,並很茫然,如何糾正填充ASP文本框

有關的守則是

<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; 
} 

回答

3

問題是,left: 525px移動div,但寬度保持在100%。您應該使用padding-left: 525pxmargin-left: 525px

+0

大,非常感謝你。 – rwolst 2013-03-19 11:17:32

-1

試試這個..

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

你需要添加padding-leftMargin-left有人說..

+0

我可以知道爲什麼我的回答是downvoted? – coder 2013-03-19 11:17:58