SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,159
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    when to use margin and padding

    Hi, I am confuse of this.when should i use margin and padding? when will be this applicable?please help me to enlighten my mind.Thank you in advance.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,329
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by jemz View Post
    when should i use margin and padding?
    Whenever you want some space.

    So, if you have some divs side by side, you might give them some margins to push them apart.

    You might also want some margins on your paragraphs to put some space between them.

    You might have a box with a background color, and some text inside that. If you don't want the text to touch the edge of the box, put some padding on the box.

    There are lots and lots of uses.

  3. #3
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,159
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Whenever you want some space.

    So, if you have some divs side by side, you might give them some margins to push them apart.

    You might also want some margins on your paragraphs to put some space between them.

    You might have a box with a background color, and some text inside that. If you don't want the text to touch the edge of the box, put some padding on the box.

    There are lots and lots of uses.
    Thank you for the quick reply.Okay i will try this...


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
  •