About 53 results
Open links in new tab
  1. css - Difference between margin and padding? - Stack Overflow

    May 11, 2011 · The main difference between margin and padding is that margin helps to create space around the element outside the border, while padding helps to create space around the element …

  2. What is the difference between margin and padding in CSS?

    Feb 3, 2010 · The space between two frames is the margin. With this in mind, a good rule of thumb is to use margin when you want to space an element in relationship to other elements on the wall, and …

  3. css - HTML Padding Style - Stack Overflow

    Jul 22, 2015 · This Stack Overflow page discusses how to use HTML padding style with CSS, providing insights and solutions for related queries.

  4. css - How to add top and bottom padding to the html element? - Stack ...

    May 23, 2023 · By setting padding: 50px 0;, you are adding 50 pixels of padding to the top and bottom of the html element. This will create space between the card and the webpage. Make sure to place this …

  5. Using CSS, how can I gradually reduce horizontal padding on very …

    Jun 3, 2025 · It would be an improvement to reduce the padding in these cases (e.g. to 10px each side for 340px, down to 0 each side for 320px), as a "last resort" to avoid horizontal scrolling. How can I …

  6. CSS padding is not working as expected in Outlook

    CSS padding is not working as expected in Outlook Asked 12 years ago Modified 1 year, 6 months ago Viewed 251k times

  7. html - Set cellpadding and cellspacing in CSS? - Stack Overflow

    In an HTML table, the cellpadding and cellspacing can be set like this: <table cellspacing="1" cellpadding="1"> How can the same be accomplished using CSS?

  8. css - Can I add background color only for padding? - Stack Overflow

    Jan 31, 2013 · I have a header box including border and padding and background color for that box, can I change the background color only for the padded region after the border and then the same …

  9. Qual a diferença entre padding e margin no CSS?

    Apr 5, 2017 · Pelo que percebo vejo um recuo em relação a outro elemento quando definidas as propriedades left, top, right e bottom. Existe diferença entre margin e padding no CSS? Uma …

  10. Why does CSS not support negative padding? - Stack Overflow

    9 Padding by definition is a positive integer (including 0). Negative padding would cause the border to collapse into the content (see the box-model page on w3) - this would make the content area smaller …