中心标记在mozilla和crome中不起作用...它仅在IE中起作用 [英] Center tag not working in mozilla and crome.... it only working in IE

查看:74
本文介绍了中心标记在mozilla和crome中不起作用...它仅在IE中起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我在页面中使用了中心标签,中间有表格和gridview.
在IE中,在Center中.但是在Mozilla和crome中,它们位于左侧.

帮帮我.

Hello,
I have used center tag in my page , in center there is table and gridview.
In IE, there are in Center. But in Mozilla and crome they are at left side.

Help me out.

推荐答案

您可以使用div 标记代替center.并设置
div的align属性居中.
You can use div tag instead of center. And set the
align property of div to center.
<div class="ParentDiv" align="center" style="margin:0;">
  <div class="ChildDiv" style="width:800px;">
    <div class="Content">
     <!--your girdview-->

    </div>
  </div>
</div>



希望对您有帮助.
祝你好运.



I hope it will help you.
Best of luck.


< div style ="width:80%; margin:0px auto;">
//在这里输入您的代码,它将居中并在所有浏览器中运行
</div>
您可以根据需要设置div的宽度
<div style="width:80%;margin:0px auto;">
//put you code here this will be centered and work in all browsers
</div>
you can set width of the div as your requirement


这篇关于中心标记在mozilla和crome中不起作用...它仅在IE中起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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