Chapter 8: Margin
Margin tag specifies the distance of the current element from its outer parent element.
For example, in the below example, the margin of red div from the blue div is 10px.
Margin can be split into four types: right, left, top and bottom.
For example, the margins are differently specified for the below blue and red colored divs.
While margin specifies the distance from current element to the outer element, padding specifies the distance from current element to its inner element.
And when specifying padding, you look inwards from the current element.
For example, the below red div has 10x padding for its inner green div.
Similar to margin, padding can also be specified differently for different sides: top, right, left, bottom.
|Email:||(Your email is not shared with anybody)|