- <!DOCTYPE html>
- <html>
-
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <style>
- .pdng_cls {
- /*padding-left,padding-right,padding-top,padding-bottom*/
- padding: 10px;
- width: 100px;
- height: 100px;
- background: red;
- }
- </style>
-
- </head>
-
- <body>
- <div class="pdng_cls"></div>
- </body>
-
- </html>
- Used of:-
Padding
- This is used to create the space between container top(<div>) and the content(text or other html elements).
- The padding shorthand property sets all the padding properties in one declaration. This property can have from one to four values.
padding: 10px 5px 15px 20px;
- padding-top is 10px
- padding-right is 5px
- padding-bottom is 15px
- padding-left is 20px
padding: 10px 5px 15px;
- padding-top is 10px
- padding-right is 5px
- padding-left is 5px
- padding-bottom is 15px
padding: 10px 5px;
- padding-top is 10px
- padding-bottom is 10px
- padding-right is 5px
- padding-left is 5px
padding: 10px;
- padding-top is 10px
- padding-bottom is 10px
- padding-right is 10px
- padding-left is 10px
padding: 10px 5px 15px 20px;
padding: 10px 5px 15px;
padding: 10px 5px;
padding: 10px;
Css:- Padding
Reviewed by Network security
on
May 06, 2019
Rating:
No comments: