4

Have you ever concluded about this?

Now I've met one, very strange, don't know why.

My code:

<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>

But it turns out to be that the "input" is valigned to the bottom,while "iframe" to the top.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
omg
  • 136,412
  • 142
  • 288
  • 348

4 Answers4

8

I experienced something similiar, when I added the css code

<td style=" vertical-align: top;" >

manually within the td tag it corrected the problem for me.

simpleengine
  • 2,764
  • 1
  • 17
  • 15
2

change the doctype to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
nemesv
  • 138,284
  • 16
  • 416
  • 359
harish
  • 21
  • 1
1

I agree, a little more information will be helpful track down this problem. If only for debugging purposes, you may want to try:

<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>

Jay
  • 4,994
  • 4
  • 28
  • 41
0

valign would only work if you used other kinds doctypes on your page, probably you have something like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Try to remove the doctype, what isn't a good practice, and see if it's works..

So put only the html tag..