I am using html language for creating my web site. The problem is i can to use CSS Padding function in my code. Does any one know how to use the CSS Padding function? I also need some example which display the declaration of CSS Padding.
I am using html language for creating my web site. The problem is i can to use CSS Padding function in my code. Does any one know how to use the CSS Padding function? I also need some example which display the declaration of CSS Padding.
The CSS padding properties is use in html to declare the space between the the element border and the element content. The CSS padding property is CSS shorthand for specifying padding on all sides of an element. With CSS Padding you will be able to change the default padding, Padding is the distance between the border of an (X)HTML element and the content within it.
Code:<style type="text/css"> td { width:60%; border:1 solid black; } td.padded { padding:30px; } </style> <table> <tr> <td class="padded"> CSS padding property</td></tr> <tr><td> not with CSS padding property.</td> </tr></table>
The padding can be set using the tag "padding".It takes the following values.Each HTML element actually has 4 different paddings: top, right, bottom, and left. a)20px : This will set a padding of 20px on the four sides (top, right, bottom, left).
Code:<html> <head> <style type="text/css"> td {padding-left: 3cm} </style> </head> <body> <table border="2"> <tr> <td> table cell with a left padding </td> </tr> </table> </body> </html>
Padding is the space inside of an HTML element and the margin is the space outside of an HTML element.The padding shorthand property sets all the padding properties in one declaration. This property can take value form fisrt to fourth. The syntax is as follows: padding: [padding-top] [padding-right] [padding-bottom] [padding-left].
Dear sirs ( Mr. Katty & Mr. MindSpace ),
With due respect, I am pleased to get the expression of Css Paddng in HTML.
with thanks & regards,
swapan.
Review following example which will depict you the Css padding in html:
HTML Code:p { padding-right: 4px; border: 2px ; } h4{ padding-bottom: 12px; padding-top: 01px; padding-left: 2px; border: 7px padding-left: 22px; }
Bookmarks