When text touches right up against the edges of a table, or when there’s no space between a row of images, it causes visual tension. Layouts tend to be more appealing when there’s a balance of content and space. Spacing and borders between elements also better define the delineations between different pieces of content.
CSS includes three different properties that help air out and organize webpage designs: padding, margin, and border. Padding adds space inside of an element, margin creates space outside of an element and border draws a line around an element.
We’ll delve into the options and details of each of these properties. With a few minor adjustments, you will quickly see how much cleaner and more professional a design can look with a bit more space and precision.
This is the header div.
Introductory information is placed in here.
Down here is the body of the page, where the main content goes.
See how these divs are grouping multiple elements?
This is the header div.
Introductory information is placed in here.
Down here is the body of the page, where the main content goes.
See how these divs are grouping multiple elements?