Borders

Submitted by Yorkiebar on
Introduction: This is the fourth part in my CSS Styling tutorials, in which I will be covering Borders. Order: Borders around elements come between the elements margin and padding. So, if the element has padding, the border will be away from the element whereas if the element only has margin, the border will be next the element but away from other elements. Basic Structure: The basic border attribute takes three arguments; Width, Type, Colour.

Margin and Padding

Submitted by Yorkiebar on
Introduction: This is the fourth part in my CSS Styling tutorials, in which I will be covering Margins and Padding. Difference? Both the margin and padding properties give white space around an object, the main difference is the order of which they occur in. At the same time, margin is mostly used for positioning while padding is used for giving white space around an object. Order: As a good example of which order the properties go in, please see that attached image which is a screen shot of the Inspect Element feature within Google Chrome.