2000web - Easy tricks in CSS

Discussion in 'CSS' started by 2000web, Nov 7, 2009.

  1. #1
    When working with margin or padding in CSS - give CLOCKWISE VALUE
    padding: 0px 0px 0px 0x; (top right bottom left)
     
    2000web, Nov 7, 2009 IP
  2. stejas

    stejas Guest

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Thanks for the info.

    You can specify
    padding:5px; (if all the sides top, right bottom left have same margin)
    padding:0 (if value is 0 no need to specify px)
     
    stejas, Nov 7, 2009 IP
  3. 2000web

    2000web Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good . . .

    Thanks for your comment
     
    2000web, Nov 9, 2009 IP
  4. silverf0x

    silverf0x Well-Known Member

    Messages:
    535
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    128
    #4
    More details :

    If you just type one value : padding:5px (it will apply to all side, top, right, bottom and left)

    If you type 2 value : padding:5px 10px (it will apply 5px for vertical, top and bottom, and 10px for horizontal;left and right)

    If you type 4 value : padding:2 4 6 8 (it will apply for top, right, bottom and left)

    Just want to add some info.
    It also work for margin
     
    silverf0x, Nov 10, 2009 IP
  5. 2000web

    2000web Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Great...Thanks for info
     
    2000web, Nov 10, 2009 IP