{"id":83,"date":"2010-12-13T21:44:14","date_gmt":"2010-12-14T02:44:14","guid":{"rendered":"http:\/\/localhost\/aarontgrogg\/practicalcss3\/"},"modified":"2011-09-18T15:04:38","modified_gmt":"2011-09-18T19:04:38","slug":"internet-explorer-filters","status":"publish","type":"page","link":"https:\/\/aarontgrogg.com\/practicalcss3\/opacity\/internet-explorer-filters\/","title":{"rendered":"Internet Explorer Filters"},"content":{"rendered":"<style>\ndiv.entry-content div { margin: .75em 0; padding: 10px; border: 3px solid #444; background: #fff;}\n#example1 {\n\topacity: .5; \/* Everything except IE *\/\n}\nhtml.lte8 #example1 {\n\tfilter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); \/* IE6-8 *\/\n\tzoom: 1; \/* 'hasLayout' required for filters *\/\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><s>There are two separate IE filters that handle opacity, one for IE6 and 7, and another for IE8.<\/s> (Scrapped the <code>-ms-filter<\/code>&#8230; who needs it?)<\/p>\n<pre>\r\n#example1 {\r\n\topacity: .5; \/* Everything except IE *\/\r\n}\r\nhtml.lte8 #example1 {\r\n\tfilter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50); \/* IE6-8 *\/\r\n\tzoom: 1; \/* 'hasLayout' required for filters *\/\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","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\/opacity\/internet-explorer-filters\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":41,"menu_order":1,"comment_status":"open","ping_status":"open","template":"","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"class_list":["post-83","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/83","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=83"}],"version-history":[{"count":0,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/83\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/41"}],"wp:attachment":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/media?parent=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}