|
Posted by David Graham on 12/20/05 12:01
"David Dorward" <dorward@yahoo.com> wrote in message
news:do703f$4b3$1$8300dec7@news.demon.co.uk...
> 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
Thank you David. I am a bit of a concrete thinker and I appreciate your
time. I would of appreciated what was going on in the diagram in the article
if they had stated somewhere that the UL element (effectively the container
in this case) was lets say 100px wide, then I could have gone through the
process you just showed me - for some strange reason the code that appears
before the diagram has no width stated for the UL. I guess they do state a
width but forgot to add it to the code for everyone to see.
Many thanks
Another David
[Back to original message]
|