{"id":134,"date":"2011-08-12T11:16:42","date_gmt":"2011-08-12T15:16:42","guid":{"rendered":"http:\/\/www.joebillman.com\/blog\/?p=134"},"modified":"2011-08-12T11:16:42","modified_gmt":"2011-08-12T15:16:42","slug":"extra-space-below-img-tag","status":"publish","type":"post","link":"https:\/\/www.joebillman.com\/blog\/?p=134","title":{"rendered":"Extra space below img tag"},"content":{"rendered":"<p>So I&#8217;ve been doing a lot of web development lately and have run into some issues that have driven me nuts. The latest one had to do with an HTML email template I was creating. for HTML emails you have to use a lot of tables which is always fun. I had a table with columns and rows that had images in them. The img tags were putting in extra space below them. I was using the HTML 4 strict doc type. That was part of the problem. If I changed that it worked fine, but I wanted to use that particular doc type since it was for an email template. I&#8217;ve been able to fix problems like this before by just adding a br tag after the img tag, but that didn&#8217;t work with this doc type. The problem is due to how the img tag is displayed. It&#8217;s generally an inline element not block. So using CSS I changed the display to block:<\/p>\n<pre style=\"background-color: #e5e5e5;\">img\n{\n    display:block;\n}<\/pre>\n<p>I overwrote the display for all of the img tags because that is what I needed, but you could do it on an individual (inline) basis.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve been doing a lot of web development lately and have run into some issues that have driven me nuts. The latest one had to do with an HTML email template I was creating. for HTML emails you have to use a lot of tables which is always fun. I had a table with &hellip; <a href=\"https:\/\/www.joebillman.com\/blog\/?p=134\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Extra space below img tag&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,31],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-problem-solved","category-web-design"],"_links":{"self":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134"}],"version-history":[{"count":0,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joebillman.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}