Results 1 to 8 of 8

Thread: Css padding in html

  1. #1
    Join Date
    Aug 2009
    Posts
    36

    Css padding in html

    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.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Css padding in html

    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.

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: Css padding in html

    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>

  4. #4
    Join Date
    Dec 2008
    Posts
    177

    Re: Css padding in html

    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).

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Css padding in html

    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>

  6. #6
    Join Date
    May 2008
    Posts
    2,012

    Re: Css padding in 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].

  7. #7
    swapantech1 Guest

    Re: Css padding in html

    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.

  8. #8
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Css padding in html

    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;
       } 

Similar Threads

  1. What is Structure Padding in C ?
    By avit in forum Software Development
    Replies: 6
    Last Post: 03-05-2012, 12:50 AM
  2. memory alignment and structure padding
    By lolguy in forum Software Development
    Replies: 2
    Last Post: 10-10-2009, 10:25 AM
  3. Html need to know about text wrap padding around an image
    By ComPaCt in forum Software Development
    Replies: 2
    Last Post: 09-07-2009, 08:30 PM
  4. Problem with width for nested div padding
    By Jaisudha in forum Software Development
    Replies: 3
    Last Post: 22-06-2009, 12:28 PM
  5. Cell Padding and Cell Spacing in HTML
    By Claudius in forum Software Development
    Replies: 3
    Last Post: 14-05-2009, 01:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,246,058.43137 seconds with 17 queries