You are here: Re: margin or padding? « HTML « IT news, forums, messages
Re: margin or padding?

Posted by jim on 05/27/07 16:08

For longer style sheets, I've pulled my hair out sometimes trying to
figure out why a certain element is not reacting to my placement
rules, only to find out that I've set the parent element with a
padding rule which is affecting the child's margin rule (or other
positioning rules).

I would agree with other posters that it's your preference, however,
it may be wise to set your own personal routine and practice of how
you do enforce spacing rulesets so you do not get confused.

My hunch is that the more prudent practice is to set specific
placement or spacing rules on the child element which you wish to
alter. If the spacing rule is intended to apply to all child elements
of a parent container, then I would think the padding rule would be
set on the parent containing element.

Hope that helps,

Jim

 

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

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