When designing a CSS based website it is very useful to understand Margins. I have found that it is much easier to deal with browser compatibility when one uses proper margin styles. Trying to set a top: -10px seems to cause browser issues that can be easily avoided by using margin-top:-10px.
Margins can be applied to the outside of any block level or inline element. They create space between the edge of an element and the edge of any adjacent elements.
Margins can be applied to the individual sides of an element.
p { margin-right: 5px}
h1 { margin-bottom: 3px}
h1 { margin-left: 4px}
Margins can also be used with a single short tag. If one value is set this value will be applied to all sides of the element.
If two values are set, the first value will be applied to the top and bottom of the element while the second value will be applied to the left and right margins.
If three values are set the fist value is applied to the top, the second value is applied to the left and right and finally the third value is applied to the bottom.
If for values are set the first value is applied to the top, the second value is applied to the right, the third value is applied to the bottom and the forth is applied to the left.
Top, Right, Bottom, Left
Helpful Articles
Diabetic Renal Diet for CKD Patients Diet
Diabetic Renal Diet Guidelines Made Easy! Being that one of the most common extrarenal diseases affecting the kidney is diabetes mellitus, diabetic renal diet has become a topic of interest nowadays...
The Lemonade Diet
There are many people who have the primary goal of weight loss and they turn to the lemonade diet to lose weight quickly...
How Nutrition Affects Your Dog’s Behavior
A very important aspect in owning and taking care of a pet dog is providing the animal with good nutrition and proper nourishment...
Tags: box model, CSS, element, How To, margin, margins, short-tag, style, styles, tutorial, Tutorials
Cheers for this G Man gonna try this out tonight on my test rig