SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2008
    Location
    KY
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about padding

    In the examples I have seen, it apperas that padding left and padding right act differently with color backgrounds. Padding left appeard to move text to the right whereas padding right appears to add more color background to the right. What am I missing?

    Rick

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,604
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    The background extends out to the edge of the padding. Which of the four sides that padding is on makes no difference, in all cases the padding is added to the outside of the content and the backgound extended to include the padding (except for Internet Explorer in quirks mode which incorrectly subtracts padding from the width and height instead of adding it).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •