Percentages: Padding & Margin, Codecademy, Learn Responsive Design, Sizing Elements

Lesson Summary

In this lesson we go over using percentage units of measurements when specifying an elements margin. When specifying margin only the width of the parent element is used. If margin-right is set using something like 50%, the element will be moved halfway to the left of the parent container(as opposed to the child element receiving a margin half of its parent's margin).