Download
    Interview Question     &Answer
Main Menu
CSS Padding@ Shwetank education.com
Definition -  The padding property in Cascading Style Sheets controls the distance between an elements border and an elements content.

h1 {
background: yellow;
padding: 20px 20px 20px 80px; }
h2 {
background: orange;
padding-left:120px;
}
Example
<html>
<head>
<style type="text/css">
p {
background-color:yellow; }
p.padding
{ padding-top:25px;
padding-bottom:25px;
padding-right:50px; padding-left: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>
Try it your self
Padding - Shorthand property
The padding property can have from one to four values.
padding:25px 50px 75px 100px;
top padding is 25px
right padding is 50px
bottom padding is 75px
left padding is 100px
Sequence in Padding shorthand property
margin top, right, bottom, left



IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms