Monday, August 19, 2013

CSS padding shorthand property

<html>
<head>
<style type="text/css">
p
{
background-color:green;
}
p.padding
{
padding:25px 50px;
}
</style>
</head>

<body>
<p>This is a paragraph with no specified padding.</p>
<p class="padding">This is a paragraph with specified paddings.</p>
</body>

</html>

Result


No comments: