Saved Bookmarks
| 1. |
Explain margins and padding in CSS with example |
|
Answer» The CSS properties, margin and padding, are both ASPECTS of spacing of an element and it's content. Margin is the OUTSIDE spacing of an HTML element from other elements. Also, both of these properties have a shorthand for defining the spacing of each side OR In CSS, a margin is the space around an element's border, while padding is the space between an element's border and the element's content. Put another way, the margin property controls the space outside an element, and the padding property controls the space INSIDE an element. |
|