<!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.
- margin-top
- margin-right
- margin-bottom
- margin-left.
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
Css:- Margin
Reviewed by Network security
on
May 06, 2019
Rating:
No comments: