Forum Moderators: not2easy
1) What is the default margin and padding value of all elements (follow-up: px or em?)?
2) When creating spaces between elements, which is better to use - margin or padding or both?
My first few lines of my style sheet.
body {
margin: 0 auto;
padding: 0;
height: 100%;
font-family: Candara, Corbel, Calibri, Verdana, Arial, Helvetica, Tahoma, sans-serif;
/* font-size: 63.8%; */
}* {
margin: 0;
padding: 0;
border: 0;
}
Thanks!
As for spacing elements by margin or padding: margin is outside the element, padding is inside, and both should be added to the overall width and height of the element, as with adding border thickness.
Marshall