Css:- Margin

<!DOCTYPE html> 

<html> 

 

<head> 

 <meta name="viewport" content="width=device-width, initial-scale=1"> 

 

 <style> 

  .mrgn_cls { 

   /*margin-left,margin-right,margin-top,margin-bottom*/ 

   margin: 100px; 

   width: 100px; 

   height: 100px; 

   background: red; 

  } 

 </style> 

 

</head> 

 

<body> 

 <div class="mrgn_cls"></div> 

</body> 

 

</html>



Uses of :-

    The CSS margin properties are used to create space around elements.
    The margin properties set the width of the white space outside the border.
    CSS has properties for specifying the margin for each side of an element
    • margin-top
    • margin-right
    • margin-bottom
    • margin-left.
Css:- Margin Css:- Margin Reviewed by Network security on May 06, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.