{"id":44,"date":"2018-01-08T07:00:41","date_gmt":"2018-01-08T14:00:41","guid":{"rendered":"https:\/\/coreassistance.com\/tips\/?p=44"},"modified":"2018-01-12T13:36:16","modified_gmt":"2018-01-12T20:36:16","slug":"easy-layout-debugging-with-outlines","status":"publish","type":"post","link":"https:\/\/coreassistance.com\/tips\/2018\/01\/08\/easy-layout-debugging-with-outlines\/","title":{"rendered":"Easy Layout Debugging with Outlines"},"content":{"rendered":"<p>When I&#8217;m working on a layout problem one of my favorite tricks to figure out what&#8217;s going on is applying <code>outline: solid red 1px<\/code> to the elements I&#8217;m working with.  This works much better than borders because outlines do not affect layout, so my debugging outlines won&#8217;t get in my way or cause further problems.<\/p>\n<p>This trick can easily be expanded for more complex debugging sessions too, just use different styles and colors on different elements.  Here are some of my favorites:<\/p>\n<pre><code class=\"css\">.troublesomeElement {\r\n    outline: solid red 1px;\r\n}\r\n\r\n.whatIsHappening {\r\n    outline: dashed blue 1px;\r\n}\r\n\r\n.seriouslyWTF {\r\n    outline: dotted orange 1px;\r\n}<\/code><\/pre>\n<p>You can also combine this trick with some fancy selectors to make sure you remember to do certain things, like fill in blank links:<\/p>\n<pre><code class=\"css\">a[href=''] {\r\n    outline: solid red 1px;\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Quickly see hidden dimensions (without messing with your layout) using a bit of CSS.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-htmlcss"],"_links":{"self":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":4,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/posts\/44\/revisions\/149"}],"wp:attachment":[{"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coreassistance.com\/tips\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}