Padding create spacing between the perimeter of each team out element in the content contained within
it.
In this tutorial we'll be adding padding around the text contained within our div similar to margins.
Padding can be added around all four sides of an element or only specified sides first we will add padding
around all sides to do that.
Take the following style definition in your div one I.D..
This will add a 10 pixel gap between the text in our div to the perimeter of the div.
So let's go ahead and save the file and take a look at it.
So we can see that we have a 10 pixel gap around the around our text right up to the perimeter of the
div.
I'm going to increase this amount of the padding
so we can better illustrate this example so I've saved the file and I'm just gonna refresh and we can
see this is now a 20 pixel padding around the text.
Now let's add padding to only the top and left side of the text to do this enter the following values
will add 30 pixels on top zero on the right zero on the bottom
and 30 pixels on the left.
So save the file and I'll refresh.
So now we have 30 pixels on the top 30 pixels on the left and zero on the bottom and right.