basics of Margin in CSS3

#1 In this section we are discussing about the Margin in CSS.

marginThe CSS margin properties are used to create space around elements, outside of any defined borders.

In Non-technical definition of margin we can say that margin is the area that is created outside of the borders in all four directions of content.

This direction includes top, right, bottom and left direction around the border.


margin1



In this image margin1 we can see that there is border around four sides of our content, lets talk about border some later time but for now we can see white area around our border from outside, which is the called margin .

By default margin is added to all four sides of the Content or we can say border of content, we can also specify that using code as follow



addMargin




In above code snippet of addMargin, we can we are applying margin to our content in this case that is paragraph tag(p) , we are giving different margin to content .



comment down below, which more things you like to read about we will try to post them.



hope it helped in clearing your doubts(if any) and thanks for reading. 






Comments

Popular posts from this blog

Basic of python for beginners

What are API's , what is their history , how to consume api's and use them in project