Reply to Re: Padding issues

Your name:

Reply:


Posted by Jukka K. Korpela on 12/23/06 23:50

Scripsit grosberg.michael@gmail.com:

> As far as I know,
> padding is supposed to be on the "inside" of an element.

Right. It's between the element's content and its edge.

> Common logic
> would imply, therefore, that if you assign an element a certain height
> and width, and also give it a padding through CSS, then the element
> would retain its stated size and render the content in a smaller area
> (size minus the padding) inside the element.

That would be common logic, but as others have explained, people who
designed CSS took a different view. Moreover, Microsoft didn't agree in
practice, causing much confusion, though this is now being cleared up,
slowly.

The thing that makes the CSS design obscure to common logic is the choice of
_words_, names for properties. Many CSS property names are misnomers.

The height and width properties should really have been called
content-height and content-width. It's too late to change now, of course.

> In bth Firefox and Explorer padding is added to the stated size .

You might say so, but it's really just about padding and the height or width
of the element's _content_. Both are set separately.

> Worse still, in firefox, padding
> in table cells is added to the left and right sides but not to the top
> and bottom!

Are you sure? URL?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

[Back to original 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

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