1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need Help

Discussion in 'CSS' started by Atik Hasan, Dec 19, 2014.

  1. #1
    I am started to learning web design. I need a little help. Can anybody tell me what is the different between margin and padding
    SEMrush
     
    Solved! View solution.
    Atik Hasan, Dec 19, 2014 IP
    SEMrush
  2. #2
    malky66, Dec 19, 2014 IP
    sarahk likes this.
  3. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #3
    Padding applies inside the rendering box, margin applies outside the rendering box.

    Now it is time to actually spend some learning instead of asking thing my 5-year old nephew can answer.

    There are thousands of sites offering basic tutorials; in many langusges, so the first skill you need to master is using a search engine to get "basic web development tutorials".
     
    COBOLdinosaur, Dec 24, 2014 IP
  4. shefeekniyas

    shefeekniyas Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    padding is space inside the boarder, margin is space outside the boarder.
    Remember these 3 points:
    • The Margin is the extra space around the control.
    • The Padding is extra space inside the control.
    • The Padding of an outer control is the Margin of an inner control.
     
    shefeekniyas, Jan 1, 2015 IP
  5. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #5
    Actually not true on both a technical specification level and implementation level. Both parsing and rendering treat them differently, those on a conceptional level you can assume that model, but the model distorts and breaks down when you apply other properties like shadows, opacity, positioning, floats and others where there are parent child dependencies.
     
    COBOLdinosaur, Jan 2, 2015 IP
    malky66 likes this.
  6. malky66

    malky66 Acclaimed Member

    Messages:
    3,846
    Likes Received:
    2,191
    Best Answers:
    85
    Trophy Points:
    515
    #6
    Ignore him mate, it's just something he copied and pasted from stackoverflow:
    http://stackoverflow.com/questions/5958699/difference-between-margin-and-padding/20755324#20755324
    Like most who come here he doesn't really know what he's talking about.
     
    malky66, Jan 2, 2015 IP
    deathshadow likes this.