Margin use in css

CSS margin properties elements around the space create is to use. Margin properties elements on the outside it will decide how much space does. CSS has four margin properties provide. The margin define these properties you have four sides.

Also provide the CSS is a shorthand property. Values for these properties, which you can define in the same statement. The value of all these properties, you can define the four type.

auto auto value you give makes the browser automatically appropriate margin set.
length in this kind of value do you define the length pixels of margin.
% Whether you are the margin set the element you have to contain him a few percent of the width of the element can also set as a margin.
inheritif you want to inherit the margin parent element, if you have the inherit value pass

margin-top property 

The property you by the top element is the margin set. The element of that property define how much space will be on the outside of the top border.

margin-right property

The property of the element to the right of you is the margin set. This element of the right and the outside of the border is specified space create.

margin-left property 

The property element Use the left side is the margin set. When the value of this property is set along the left side of the border element is out of the space create.


Posted in CSS

Leave a Comment