not work? Have you ever talked about this? Now I met one, very strange, I do not know why. My code is:

When does <td valign = "top"> not work?

Have you ever talked about this?

Now I met one, very strange, I do not know why.

My code is:

<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 that the "input" is evaluated at the bottom, and the "iframe" at the top.

+4
source share
4 answers

I experienced something similar when I added css code

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

manually in the td tag he fixed the problem for me.

+8
source

change doctype to

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
+2
source

I agree, a little more information will be useful to track this issue. If only for debugging purposes, you can 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> 

+1
source

valign will only work if you used other types of doctrines 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 removing doctype, which is not good practice and see if it works.

So put only the html tag ..

0
source

All Articles