You are here: Re: Padding issues « HTML « IT news, forums, messages
Re: Padding issues

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация