Previous Message
Next Message

Re: [css-d] Header/Footer - Why doesn't this work?

Sent by Brandon Oto on 3 December 2002 05:05


on 12/2/02 8:40 AM, Mark Howells at [EMAIL-REMOVED] mumbled something
about:

> According to the W3C specification, the padding and margins are added
> to the content width, so a box with content width of 100% with any
> padding will be wider than 100% (if interpreted correctly by the
> browser).

The CSS attribute "width" doesn't define the "content width," per se - it
defines the width of the box itself, including content and padding, but not
including borders and margins. (Somebody correct me if I'm wrong; borders
might be inside the width. I don't use wide borders very often.)

This rule:

.foo {
width: 100px;
padding: 10px;
border-width: 1px;
margin: 10px}

... would create a box 122px wide. That's the width plus both borders plus
both margins (I'm dealing only in the horizontal plane, here). The padding
is not taken into account.

- Brandon Oto

_______________________________________________
css-discuss [EMAIL-REMOVED]]
http://two.pairlist.net/mailman/listinfo/css-discuss
Sponsored by www.westciv.com - CSS resources | software | learning
Previous Message
Next Message

Message thread: