Friday, 2 June 2017

Set The Padding in The Box model Using CSS

Padding means space in the box model specifies the distance between the border of an element and the content within it. The padding is affected by the background color of an element.
Create a Web Page for showing the padding how to work.
here padding.html file which is used to display all properties in padding.

<!doctype html>
<head>
<title>padding properties</title>
<style>
p{
background-color:green;font-size:20px;color:yellow;
padding-top:50px;
padding-bottom:50px;
padding-right:25px;
padding-left:25px;
}
</style>
<head>
<body>
<p>In this paragraph the background color is green, font color is yellow and font size is 20px and padding with top and bottom are 50px, right, and left are 25px</p>
</body>
</html>

In this Web page we set the padding-top,padding-bottom, padding-right and padding-left using the CSS code.


No comments:

Post a Comment