html - Maintain the height of <td> at a fixed amount, no matter what (IE vs FireFox) -
i have html page containing table, problem height of 1 <td>
rendered correctly in ie-8 incorrectly in firefox 20.0.1
i'm fan of firefox myself, specially when comes ie :) anyway have set height of <td>
, containing word "bottom", 30px (or 10%; makes no difference) , upper <td>
90%
the height of bottom <td>
shown correctly in firefox when reduce contents of right <td>
, when add more lines of text in right <td>
, (the bottom one) shown incorrectly(very larger) in firefox , okay in ie.
what's wrong code or unlikely firefox? :) in other words, want keep height of bottom <td>
30px no matter what. here's code:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>agent</title> <style> html, body { height: 100% } </style> </head> <body> <table border="1" cellspacing="0" cellpadding="0" width="100%" height="100%"> <tr > <td id=properties width="20%" height="90%"> top </td> <td id=step rowspan="2" width="80%" > right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> right <br> </td> </tr> <tr > <td width="20%" height="30px"> bottom </td> </tr> </table> </body> </html>
30px
not valid value height
attribute td
. note that
the height attribute not supported in html5. use css instead.
you can either try (html)
<td width="20%" height="30">
or css
<td style="width:20%;height:30px">
syntax is
<td height="pixels|%">
Comments
Post a Comment