|
Posted by Jonathan N. Little on 12/24/06 15:31
grosberg.michael@gmail.com wrote:
>
> Umm, test this (I found it on firefox 2):
>
> <html>
>
> <head>
> <title>test</title>
> </head>
> <body>
> <table>
> <tr>
> <td style="width: 200px; height: 200px; background-color: cyan;
> vertical-align: top; padding: 50px">sample text
> </td>
> </tr>
> </table>
> </body>
> </html>
>
Looks the same to me in FF2 and IE6. But "height" property on table
cells behave differently then other block elements, and that may be the
trouble. Tables cells tend to adjust to fix content, which is desirable
for tabular data, but not for layout. But then again, you should not use
a table for layout. Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>test</title>
</head>
<body>
<div style="width: 200px; height: 200px; background-color: cyan;
vertical-align: top; padding: 50px">sample text
</div>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|