CSS TUTORIALS - CSS - Padding
CSS - Padding
|
This is a paragraph with a specified bottom padding This is another paragraph with a specified bottom padding in percent |
|
This is a paragraph with a specified top padding This is another paragraph with a specified top padding in percent |
|
This is a paragraph with a specified left padding This is another paragraph with a specified left padding in percent |
|
This is a paragraph with a specified right padding This is another paragraph with a specified right padding in percent |
<p style="padding: 15px; border:1px solid black;"> all four padding will be 15px </p> <p style="padding:10px 2%; border:1px solid black;"> top and bottom padding will be 10px, left and right padding will be 2% of the total width of the document. </p> <p style="padding: 10px 2% 10px; border:1px solid black;"> top padding will be 10px, left and right padding will be 2% of the total width of the document, bottom padding will be 10px </p> <p style="padding: 10px 2% 10px 10px; border:1px solid black;"> top padding will be 10px, right padding will be 2% of the total width of the document, bottom padding and top padding will be 10px </p> |
all four paddings will be 15px top and bottom paddings will be 10px, left and right paddings will be 2% of the total width of the document. top padding will be 10px, left and right padding will be 2% of the total width of the document, bottom padding will be 10px top padding will be 10px, right padding will be 2% of the total width of the document, bottom padding and top padding will be 10px |