Css 何时将<;td valign=";top"&燃气轮机;不工作?
你对这件事有过结论吗 现在我遇到了一个,很奇怪,不知道为什么 我的代码:Css 何时将<;td valign=";top"&燃气轮机;不工作?,css,html-table,valign,Css,Html Table,Valign,你对这件事有过结论吗 现在我遇到了一个,很奇怪,不知道为什么 我的代码: <td valign="top"> <input type="text" /> <iframe scrolling="no" height="21px" frameborder="0" width="62px" marginheight="0" marginwidth="0" src="Server/SecCode.php"> </iframe> &l
<td valign="top">
<input type="text" />
<iframe scrolling="no" height="21px" frameborder="0" width="62px" marginheight="0" marginwidth="0" src="Server/SecCode.php">
</iframe>
</td>
但事实证明,“输入”在底部有效,而“iframe”在顶部有效。我同意,更多的信息将有助于追踪这个问题。如果仅出于调试目的,您可能希望尝试:
<td valign="top">
<input type="text" /><Br/>
<iframe scrolling="no" height="21px" frameborder="0" width="62px" marginheight="0" marginwidth="0" src="Server/SecCode.php">
</iframe>
只有在页面上使用其他类型的doctype时,valign才会起作用, 也许你有这样的想法:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
尝试删除doctype,这不是一个好的做法,看看它是否有效
所以只放html标签 当我添加css代码时,我也经历了类似的事情
<td style=" vertical-align: top;" >
在td标签内手动为我纠正了问题。将doctype更改为
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
“不工作”没有任何意义。发布您的代码、预期输出和实际问题。您是否使用TD垂直对齐?您的TD在的范围内,对吗?同时显示代码。我认为TD更具体,比如说显式覆盖时TR不会影响TD,对吗?为什么要添加“br”?我已经提供了所有相关信息。我从firebug中可以看出,没有应用其他css规则。