我想中心登錄控件,它使用loginstatus控件選擇登錄後顯示。如何將loginStatus登錄屏幕居中
<div id="linkContent">
<asp:LoginStatus ID="LoginStatus2" runat="server"
LogoutAction="RedirectToLoginPage" />
</div>
我嘗試了幾種不同的方法,我發現在谷歌和沒有工作。我使用的IE 9
我想:
#linkContent
{
text-align: center;
}
我曾嘗試:
<div id="linkContent">
<asp:LoginStatus ID="LoginStatus2" runat="server"
LogoutAction="RedirectToLoginPage" style="text-align: center;" />
</div>
,我嘗試:
#linkContent
{
margin-left:auto;
margin-right:auto;
}
我還指出登錄到我自己的登錄.aspx但它不起作用:
在webconfig中:
<authentication mode="Forms" >
<forms loginUrl="Login.aspx" />
</authentication>
這些都沒有奏效。登錄控件保持左對齊。 loginStatus控件在母版頁中使用。
任何幫助,將不勝感激。
謝謝。
給這一個鏡頭:HTTP:/ /css-tricks.com/centering-in-the-unknown/ – microspino 2011-12-15 16:57:14