在Mozilla中,aspx页面无法正常工作 [英] aspx page is not working fine in mozilla
问题描述
<表格样式="text-align:center" width ="500" border ="0" cellpadding ="0" cellspacing ="0">
  ; nbsp; < tr> nbsp; ; < td align ="center">
&b ; < asp:Label ID ="Label1" runat ="server" SkinID ="TableHeading" Text ="Report"
nbsp; bsp 宽度="100%"</asp:标签</td>
; </tr>
< tr> nbsp; ; < td align ="center">
&b ; < asp:标签ID ="Label2" runat =服务器" Text =访问权限"></asp:标签   ; nbsp; b ; < asp:TextBox ID ="txtaccno" runat ="server">//asp:TextBox>
  ; </td>
</tr>
</table>
此代码在Internet Explorer中可以正常工作,但在mozilla中仍然有效
我建议您阅读CSS,特别是浏览器之间的不同含义.如果您正在做网络工作,那么最好在这个问题上拥有一些资源,因为它会一遍又一遍地影响您.
table style="text-align:center"
不会使表格中心对齐.
您需要在表格周围包裹一个容器div,并使该中心对齐.
像这样使用:
<div style="width:100%; text-align:center"> <table style="text-align: center" width="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <asp:Label ID="Label1" runat="server" SkinID="TableHeading" Text="Report" Width="100%"></asp:Label></td> </tr> <tr> <td align="center"> <asp:Label ID="Label2" runat="server" Text="Access No"> </asp:Label> <asp:TextBox ID="txtaccno" runat="server"></asp:TextBox> </td> </tr> </table> </div>我希望这会起作用.
这是唯一的css问题,您应该重新考虑css脚本,尤其是firefox和css渲染问题
>
<table style="text-align: center" width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<asp:Label ID="Label1" runat="server" SkinID="TableHeading" Text="Report"
Width="100%"></asp:Label></td>
</tr>
<tr>
<td align="center">
<asp:Label ID="Label2" runat="server" Text="Access No"></asp:Label>
<asp:TextBox ID="txtaccno" runat="server"></asp:TextBox>
</td>
</tr>
</table>
this code is working fine in internet explorer but in mozilla it alings left
I suggest you do some reading on CSS and especially the different implimentations between browsers. If you''re doing web work, you''d do well to have some resources on this subject, because it''s going to affect you over and over again.
table style="text-align:center"
doesnt make the table center aligned.
You need to wrap a container div around your table and make that center aligned.
Use like this :<div style="width:100%; text-align:center"> <table style="text-align: center" width="500" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"> <asp:Label ID="Label1" runat="server" SkinID="TableHeading" Text="Report" Width="100%"></asp:Label></td> </tr> <tr> <td align="center"> <asp:Label ID="Label2" runat="server" Text="Access No"> </asp:Label> <asp:TextBox ID="txtaccno" runat="server"></asp:TextBox> </td> </tr> </table> </div>I hope this would work.
it''s only css issue, you should reconsider your css scripts espesially that firefox and ie have some different css rendering issue
这篇关于在Mozilla中,aspx页面无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!