Reply to Re: wrong colours

Your name:

Reply:


Posted by David Dorward on 12/19/05 21:00

David Graham wrote:

>> Otherwise, it is whatever is left over after margins, borders, and
>> paddings have been accounted for.

> Perhaps you thought I meant BOX width, the box width includes the margins,
> borders and padding but from what i have read the content width excludes
> all of these. I think the confusion arises because I don't understand what
> you mean by 'left over after....'

#container { width: 100px; }
#element { margin: 10px; padding: 10px; border: solid black 1px; }

You have a space 100px wide.
You have a left margin of 10px. That leaves 90px.
You have a right margin of 10px. That leaves 80px.
You have a left border of 1px. That leaves 79px.
You have a right border of 1px. That leaves 78px.
You have left padding of 10px. That leaves 68px.
You have a right padding of 10px. That leaves 58px.

Thus you end up with a content width of 58px.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

[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

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