I'm having some trouble understand padding and margin.
I want to make a layout that looks like the attachement: a container with a white background; then 4px away from the container's borders, an inner div that has a 1px border; and 10px away from the inner div's borders, the content of the website.
When I'm playing with margin and padding, it either makes the container wider or makes the right part of the inner to go past the container's border.
FYI
* My screen resolution is set at 1680x1050
* I'm accessing your site through a T1 line
* I'm probably viewing it using Firefox (unless browser is specified)
Setting a width and auto side margins on the inner div is not necessary, as the outer divs padding will determine the placement and size of the inner div :
Setting a width and auto side margins on the inner div is not necessary, as the outer divs padding will determine the placement and size of the inner div :
The width setting on anything is the internal width (available to contents), and padding and borders are added to this. If you want 4px padding and the external width to be 400px, then just set the width to 392px.
Bookmarks