{"id":77,"date":"2010-12-13T21:38:00","date_gmt":"2010-12-14T02:38:00","guid":{"rendered":"http:\/\/localhost\/aarontgrogg\/practicalcss3\/"},"modified":"2011-09-18T15:03:31","modified_gmt":"2011-09-18T19:03:31","slug":"internet-explorer-filters","status":"publish","type":"page","link":"https:\/\/aarontgrogg.com\/practicalcss3\/box-shadow\/internet-explorer-filters\/","title":{"rendered":"Internet Explorer Filters"},"content":{"rendered":"<style>\ndiv.entry-content div { margin: .75em 0 2em; padding: 10px; border: 3px solid #444; background: #fff;}\n#example1 {\n\t-moz-box-shadow: 5px 5px 0 #666; \/* FF3.5+ *\/\n\t-webkit-box-shadow: 5px 5px 0 #666; \/* Saf3.0+, Chrome *\/\n\tbox-shadow: 5px 5px 0 #666; \/* Opera 10.5, IE9+, W3C  *\/\n}\nhtml.lte8 #example1 {\n\tfilter: progid:DXImageTransform.Microsoft.DropShadow(color='#666666',offX='5',offY='5',positive='true'); \/* IE6-8 *\/\n\tzoom: 1; \/* 'hasLayout' required for filter *\/\n}\n#example2 {\n\t-moz-box-shadow: 5px 5px  5px #666; \/* FF3.5+ *\/\n\t-webkit-box-shadow: 5px 5px  5px #666; \/* Saf3.0+, Chrome *\/\n\tbox-shadow: 5px 5px  5px #666; \/* Opera 10.5, IE9+, W3C  *\/\n}\nhtml.lte8 #example2 {\n\tfilter: progid:DXImageTransform.Microsoft.Shadow(color='#666666',direction='135',strength='5'); \/* IE6-8 *\/\n\tzoom: 1; \/* 'hasLayout' required for filter *\/\n}\n<\/style>\n<p>Internet Explorer Filters are a pure CSS implementation that, when used in conjunction with the HTML5 Boilerplate <code>&lt;html&gt;<\/code> conditional comments, requires no hacks and (almost) validates perfectly!<\/p>\n<p>Note that this CSS will not validate because <code>filter<\/code> is invalid.  If validation is important to you, this could be served via an IE-only stylesheet.<\/p>\n<p>There are two IE filters that apply something that is supposed to look like a drop-shadow: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms532985%28v=VS.85%29.aspx\">DropShadow<\/a> and <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms533086%28v=VS.85%29.aspx\">Shadow<\/a>.  I know, how imaginative&#8230;<\/p>\n<p><code>DropShadow<\/code> creates a &#8220;separated&#8221; shadow look, with defined edges:<\/p>\n<pre>\r\n#example1 {\r\n\t-moz-box-shadow: 5px 5px 0 #666; \/* FF3.5+ *\/\r\n\t-webkit-box-shadow: 5px 5px 0 #666; \/* Saf3.0+, Chrome *\/\r\n\tbox-shadow: 5px 5px 0 #666; \/* Opera 10.5, IE9+, W3C  *\/\r\n}\r\nhtml.lte8 #example1 {\r\n\tfilter: progid:DXImageTransform.Microsoft.DropShadow(color='#666666',offX='5',offY='5',positive='true'); \/* IE6-8 *\/\r\n\tzoom: 1; \/* 'hasLayout' required for filter *\/\r\n}\r\n<\/pre>\n<div id=\"example1\">\n<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<\/p><\/div>\n<p><code>Shadow<\/code> creates a &#8220;connected&#8221; shadow look, with its edges still connected to the edges of the element, and the closest thing IE filters come to a &#8220;soft&#8221; edge:<\/p>\n<pre>\r\n#example2 {\r\n\t-moz-box-shadow: 5px 5px  5px #666; \/* FF3.5+ *\/\r\n\t-webkit-box-shadow: 5px 5px  5px #666; \/* Saf3.0+, Chrome *\/\r\n\tbox-shadow: 5px 5px  5px #666; \/* Opera 10.5, IE9+, W3C  *\/\r\n}\r\nhtml.lte8 #example2 {\r\n\tfilter: progid:DXImageTransform.Microsoft.Shadow(color='#666666',direction='135',strength='5'); \/* IE6-8 *\/\r\n\tzoom: 1; \/* 'hasLayout' required for filter *\/\r\n}\r\n<\/pre>\n<div id=\"example2\">\n<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Internet Explorer Filters are a pure CSS implementation that, when used in conjunction with the HTML5 Boilerplate &lt;html&gt; conditional comments, requires no hacks and (almost) validates perfectly! Note that this CSS will not validate because filter is invalid. If validation &hellip; <a href=\"https:\/\/aarontgrogg.com\/practicalcss3\/box-shadow\/internet-explorer-filters\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":39,"menu_order":1,"comment_status":"open","ping_status":"open","template":"","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"class_list":["post-77","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":0,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/77\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/39"}],"wp:attachment":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/media?parent=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}