在设计Web窗体的时候,我们都会有一些感觉,不好布局,经过摸索找到了一条捷径:以绝对定位布局控件,然后加一层来调节整体位置。比如你想让它居中,如下设置:
<body style=“text-align: center“>
    <div style=“position: relative;“>
           <form runat = “server“>
                 <asp:textbox .... ></asp:textbox>
           </form>
    </div>
</body>

相关文章: