如何在浏览器中间加载我的页面? [英] How to load my page in the middle of the browsers?

查看:105
本文介绍了如何在浏览器中间加载我的页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候..

我在Visual Studio 2003上使用ASP.Net设计了一个页面,但该页面始终加载在任何浏览器的左侧,因此现在我想将其加载到浏览器(即IE,Firefox,Chrome等)的中心.以下html:

Greetings..

i designed a page using ASP.Net on Visual Studio 2003, but it is always loaded in the left of any browser so now I want to load it at the center of the browsers (IE, Firefox, Chrome,..) and I have the following html:

<body MS_POSITIONING="GridLayout">
    <div align="center">
        <form id="Form1" method="post" runat="server">
            <asp:Image style="Z-INDEX: 100; POSITION: absolute; TOP: 272px; LEFT: 8px" id="TopImage" runat="server"

                Width="1030px" Height="600px" ImageUrl="file:///C:\Documents and Settings\Dgharib\Desktop\Images Repository\world-map-background1.jpg"></asp:Image>
           <asp:Label style="Z-INDEX: 105; POSITION: absolute; TOP: 312px; LEFT: 144px" id="lbHome" runat="server"

                Height="522px" Width="824px" BackColor="Transparent" ForeColor="Yellow">Home</asp:Label>
            <asp:Button style="Z-INDEX: 107; POSITION: absolute; TOP: 272px; LEFT: 232px" id="btnHome" runat="server"

                Height="24px" Width="120px" Text="Home" BackColor="CornflowerBlue" ForeColor="White" BorderStyle="Double"></asp:Button>
        </form>
    </div>
</body>




因此,如该html中所示,我使用了




So as shown in this html I used

...

,但该页面仍在浏览器的左侧加载,而且仅在IE中正确加载,而在其他浏览器中均未正确加载... .


请指教...

在此先感谢...

but still the page is loaded in the left of the browser plus it loads correctly in IE only and not in other browser....


Please advise...

Thanks in advance...

推荐答案

您是否通过设置样式属性来了解CSS水平对齐方法?

http://www.w3schools.com/css/css_align.asp [
Have you had a look at CSS Horizontal alignment methods by setting style properties?

http://www.w3schools.com/css/css_align.asp[^]

Worth a read, and may help you achieve your goal.


将div标签左侧和右侧的边距设置为自动
set the margin on left and right of your div tag to auto


删除此
MS_POSITIONING ="GridLayout"
来自身体标签
并添加align ="center"
remove this
MS_POSITIONING="GridLayout"
from body tag
and add align="center"


这篇关于如何在浏览器中间加载我的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆