Monday, September 10, 2012

CSS: Margin

CSS Margin:
Margin is the distance from neighboring elements. Padding and Margin are nearly the same. Padding is for a single element and related to element itself while margin is related to other elements or controls around another control.
Example:
I am creating a div having a border and then put up an paragraph inside it and apply margin on it. This example will make you understand the margin concept very well.

The code that I have used along with setting margin on Left button is given below:
        
Hope you have got the idea of margin well. Your suggestions for improvements will be highly appreciated.

No comments:

Post a Comment