SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style Sheet code question (general, not specific)

    When looking at code such as this

    Code:
     
    #blah {
    padding: 0px 15px 2px ;
    Does that mean 0 pixels top and bottom, then 15px right, 2 pixels left

    Does that mean 0 px top, 15 pixels bottom, 2 pixels left and right?

    Me confused

  2. #2
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It goes top, right, bottom, left. Think clockwise. If there are only two values the first is top/bottom the second right/left. I don't know that you can mix the two together.

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah yes - the method for rembering this is...

    think of a clock face and start at 12 oclock, that's "top" then proceed around the clock face to 3 o'clock and that is "right", 6 == bottom and 9 == left

    Easy

  4. #4
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, that 3 is what dreamweaver created, for some reason So its either 2 or 4 basically?

  5. #5
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 3 values represent top - left & right - bottom.

    From http://www.w3schools.com/css/pr_padding.asp :
    h1 {padding: 10px 2% 15px}
    top padding will be 10px, left and right padding will be 2% of the width of the closest element, bottom padding will be 15px
    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  6. #6
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I appreciate it


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
  •