SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Please help with CSS margin and padding...

    Hy, I know its a very simple problem. But I am not understanding properly from w3schools. I surrender!! Please can you explain me properly with example what is CSS margin and padding and how it works.


    Thanks in advance.
    Professional logo designing service take a look at My portfolio

    Blogger from make money blogging
    Christian works from home

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    It's better to ask a more specific question based on what you are trying to do—meaning that you should ideally post the HTML you are using and what CSS you've tried ... etc.

    But here are two useful pages that give proper information on margin and padding:

    margin: http://reference.sitepoint.com/css/margin

    padding: http://reference.sitepoint.com/css/padding
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In simple terms, picture your content in a box.
    The margin is the gap between the box edges and the neighboring boxes of content outside the box.
    The padding is the gap between the box edges and the content inside the box.


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
  •