![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When adding a border to a div with CSS, where does it's pixels exist in relation to the div's width and height? For instance, if I create a 300px by 300px div and add a 1px border to it, have I now created a 302px by 302px div, or have I reduced my usable space within the div to 298px by 298px? Nicholas |
#3
| |||
| |||
|
|
In article <tdadnSSUaJdKqu_YnZ2dnUVZ_qadnZ2d (AT) comcast (DOT) com>, "Nicholas" <no-reply (AT) email (DOT) com> wrote: When adding a border to a div with CSS, where does it's pixels exist in relation to the div's width and height? For instance, if I create a 300px by 300px div and add a 1px border to it, have I now created a 302px by 302px div, or have I reduced my usable space within the div to 298px by 298px? Nicholas 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containing block To see, make a test with huge borders, use a Strict 4.01 doctype. -- dorayme |
#4
| |||
| |||
|
|
When adding a border to a div with CSS, where does it's pixels exist in relation to the div's width and height? For instance, if I create a 300px by 300px div and add a 1px border to it, have I now created a 302px by 302px div, or have I reduced my usable space within the div to 298px by 298px? |
![]() |
| Thread Tools | |
| Display Modes | |
| |