{"id":3004,"date":"2022-03-04T03:12:37","date_gmt":"2022-03-04T03:12:37","guid":{"rendered":"https:\/\/rengga.dev\/blog\/?p=3004"},"modified":"2023-06-12T14:32:48","modified_gmt":"2023-06-12T14:32:48","slug":"css-tutorial-reset-all-margins-padding","status":"publish","type":"post","link":"https:\/\/rengga.dev\/blog\/css-tutorial-reset-all-margins-padding\/","title":{"rendered":"CSS Tutorial &#8211; Reset All Margins &#038; Padding"},"content":{"rendered":"<p><span style=\"color: #ef3207;\"><a style=\"color: #ef3207;\" href=\"https:\/\/rengga.dev\/\" target=\"_blank\" rel=\"noopener\"><strong>Rengga Dev<\/strong><\/a> <\/span>&#8211; This has become a very popular technique lately, and for good reason. It removes all default margin and padding for every object on the page, no holds barred, regardless of browser. This provides a nice clean slate for design and ensures that all spacing is intentional, explict, and ubiquitous across browsers. There is no reason not to do this.<\/p>\n<p>Some people like to include\u00a0<code>border: 0;<\/code>\u00a0as a part of it, but it has been found to not be effective in all situations (including the annoying\u00a0<img \/> borders), so why bother\u2026<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\">* {\r\nmargin: 0;\r\npadding: 0;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rengga Dev &#8211; This has become a very popular technique lately, and <a class=\"read-more\" href=\"https:\/\/rengga.dev\/blog\/css-tutorial-reset-all-margins-padding\/\" title=\"CSS Tutorial &#8211; Reset All Margins &#038; Padding\" itemprop=\"url\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":3756,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,2],"tags":[197,260,103,227],"newstopic":[],"class_list":{"0":"post-3004","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-html-css","8":"category-web-design","9":"tag-css-tutorial","10":"tag-reset-all-margins-padding","11":"tag-web-design","12":"tag-web-designer"},"_links":{"self":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/comments?post=3004"}],"version-history":[{"count":2,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3004\/revisions"}],"predecessor-version":[{"id":3757,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/3004\/revisions\/3757"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media\/3756"}],"wp:attachment":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media?parent=3004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/categories?post=3004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/tags?post=3004"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/newstopic?post=3004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}