Html 对齐在firefox上不起作用
垂直和水平对齐以及高度百分比在firefox中无法正常工作,尽管它在IE和Chrome上运行良好 我在html和正文中将高度和宽度设置为100%Html 对齐在firefox上不起作用,html,css,firefox,Html,Css,Firefox,垂直和水平对齐以及高度百分比在firefox中无法正常工作,尽管它在IE和Chrome上运行良好 我在html和正文中将高度和宽度设置为100% html,body { heigh:100% ; width:100% } 我尝试了所有可能的解决方案,比如text align:-moz-center;显示:块 这是我的密码 <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 93%;"&
html,body { heigh:100% ; width:100% }
我尝试了所有可能的解决方案,比如text align:-moz-center;显示:块代码>
这是我的密码
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 93%;">
<tr style="height: 42px; width: 100%">
<td style="width: 80px; background-image: url(Images/logo.png); background-repeat: no-repeat;
height: 42px;">
</td>
<td style="height: 42px">
</td>
</tr>
<tr align="center" valign="middle">
<td style="height: 196px;" align="center" valign="middle">
<table class="partTable" style="padding-bottom: 20px">
<tr>
<td align="center" style="font-size: xx-large; font-family: Arial Black; color: #C11B17">
<span>
<%=System.Configuration.ConfigurationManager.AppSettings["AppName"]%>
</span>
</td>
</tr>
</table>
<table border="0" style="text-align: -moz-center; vertical-align: middle; display: block;
margin: 0 auto;">
<tr>
<td valign="middle" class="partHolder" style="width: 314px; height: 201px;">
--Content
</td>
</tr>
</table>
</tr>
--内容
注意:表格不占页面的93%。它就像一辆汽车。当我把
放在html标记之前时,就发生了这种情况
使用stylemargin:0 auto
将表格居中
确保桌子的所有容器高度:100%;
例如:
- -解决办法是什么
您的代码中有一些不方便的地方:
<tr style="height: 42px; width: 100%">
^^^^^^^^^^^^ this is ok
</tr>
<tr align="center" valign="middle">
<td style="height: 196px;">
^^^^^^^^^^^^^^
This is wrong. you should
remove it to make table auto-risze.
And you should use `height` only to <tr>
^^^^^^^^^^^^这没关系
^^^^^^^^^^^^^^
这是错误的。你应该
将其移除以使表格自动刷新。
而且你应该用'height'来表示
它就像一辆汽车。当我把
html标记之前
如果使用height:93%
,然后对行使用height:42px
,height:196px
,Firefox就会疯掉。我相信Firefox在使用
标记时使用了更严格的方法来呈现HTML+CSS
还有。。不要将文本对齐
用于表格
,tr
——因为它们不包含任何文本。仅用于td
margin:0px auto
使表格居中。顺便说一句,对我来说很好…高度问题:93%和垂直对齐解决了,但水平对齐仍然存在。谢谢你的回答。我想将第一个tr向左对齐,第二个tr居中对齐。对于
,
请不要使用文本对齐
,
td中有两个表格