Posts

Showing posts with the label Padding in CSS

Padding in CSS

Image
CSS  Padding The CSS  padding  properties are used to define the   space between the content and the borders. CSS has   the padding for each side of an element such as   (top, right, bottom, and left). Defining Padding one each Sides CSS has properties for specifying the padding for each side of an element: padding-top padding-right padding-bottom padding-left These properties can take the following values: length  - specifies a padding in px, pt, cm, etc. %  - specifies a padding in % of the width of the containing element inherit - specifies that the padding should be inherited from the parent element Note:  Negative values are not allowed. Set different padding for all four sides of a element:   div  {   padding-top :  50px ;   padding-right :  30px ;   padding-bottom :  50px ;   padding-left :  80px ; }...