{"id":18028,"date":"2016-09-29T16:09:38","date_gmt":"2016-09-29T16:09:38","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=18028"},"modified":"2016-09-29T16:16:06","modified_gmt":"2016-09-29T16:16:06","slug":"web-programming-the-auto-setting","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/web-programming-the-auto-setting\/","title":{"rendered":"Web programming:  the &#8220;auto&#8221; setting"},"content":{"rendered":"<h1>The tutor talks a bit about &#8220;auto&#8221;:  is it the default setting for layout?<\/h1>\n<p>I&#8217;ve read that &#8220;auto&#8221; is default:  unless you set the property to something else in particular, the element will be rendered as though that property was &#8220;auto&#8221;.  Not always, in my experience; I&#8217;ll show you now:<\/p>\n<p>Here&#8217;s an image without the &#8220;margin:auto&#8221; setting:<\/p>\n<p><img decoding=\"async\" src=\"\/..\/images\/hello_sep29_2016.png\" style=\"display:block\" \/><\/p>\n<p style='color:green;text-align:center'>&#60;img src=&#8221;source0.abc&#8221; style=&#8221;display:block&#8221; \/&#62;<\/p>\n<p>Here&#8217;s the same image with &#8220;margin:auto&#8221; included:<\/p>\n<p><img decoding=\"async\" src=\"\/..\/images\/hello_sep29_2016.png\" style=\"display:block;margin:auto\" \/><\/p>\n<p style='color:green;text-align:center'>&#60;img src=&#8221;source0.abc&#8221; style=&#8221;display:block;<span style=\"color:red\">margin:auto<\/span>&#8221; \/&#62;<\/p>\n<p>I&#8217;ve viewed this post in Chrome, ie11, and Firefox.  In each case, the top image is left-aligned, while the bottom one is centered.<\/p>\n<p>So many times I&#8217;ve keyed &#8220;margin:auto&#8221; wondering &#8220;Is this redundant?&#8221;  Certainly not always:)<\/p>\n<p>Source:<\/p>\n<p><a href=\"http:\/\/www.w3schools.com\/css\/css_margin.asp\">w3schools.com<\/a><\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor talks a bit about &#8220;auto&#8221;: is it the default setting for layout? I&#8217;ve read that &#8220;auto&#8221; is default: unless you set the property to something else in particular, the element will be rendered as though that property was &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/web-programming-the-auto-setting\/\"> <span class=\"screen-reader-text\">Web programming:  the &#8220;auto&#8221; setting<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1631,1855],"tags":[1921,1922,1920],"class_list":["post-18028","post","type-post","status-publish","format-standard","hentry","category-css","category-web-programming","tag-do-you-need-marginauto-is-marginauto-redundant-is-marginauto-default","tag-marginauto-for-centering","tag-marginauto-property"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=18028"}],"version-history":[{"count":22,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18028\/revisions"}],"predecessor-version":[{"id":18050,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/18028\/revisions\/18050"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=18028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=18028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=18028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}