{"id":89,"date":"2010-12-13T21:50:24","date_gmt":"2010-12-14T02:50:24","guid":{"rendered":"http:\/\/localhost\/aarontgrogg\/practicalcss3\/"},"modified":"2011-09-18T15:07:33","modified_gmt":"2011-09-18T19:07:33","slug":"internet-explorer-filters","status":"publish","type":"page","link":"https:\/\/aarontgrogg.com\/practicalcss3\/rotate-text\/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; position: relative; }\n#example1 p {\n\tmargin-left: 30px;\n}\n#example1 p.date {\n\tbackground: red;\n\tmargin: 0;\n\tposition: absolute; \/* required to force placement within parent *\/\n\ttop: 35px;\n\tleft: 0;\n\t-moz-transform: rotate(-90deg); \/* FF *\/\n\t-o-transform: rotate(-90deg); \/* Opera *\/\n\t-webkit-transform: rotate(-90deg); \/* Safari and Chrome *\/\n\ttransform: rotate(-90deg); \/* IE9+, W3C *\/\n}\nhtml.lte8 #example1 p.date {\n\ttop: 25px; \/* required to force placement within parent *\/\n\tleft: 10px;\n\t\/* Rotation values 0, 1, 2, 3 represent 0, 90, 180, 270 degrees respectively *\/\n\tfilter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); \/* 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>\u2026 who needs it?)<\/p>\n<pre>\r\n#example1 p {\r\n\tmargin-left: 30px;\r\n}\r\n#example1 p.date {\r\n\tbackground: red;\r\n\tmargin: 0;\r\n\tposition: absolute; \/* required to force placement within parent *\/\r\n\ttop: 35px;\r\n\tleft: 0;\r\n\t-moz-transform: rotate(-90deg); \/* FF *\/\r\n\t-o-transform: rotate(-90deg); \/* Opera *\/\r\n\t-webkit-transform: rotate(-90deg); \/* Safari and Chrome *\/\r\n\ttransform: rotate(-90deg); \/* IE9+, W3C *\/\r\n}\r\nhtml.lte8 #example1 p.date {\r\n\ttop: 25px; \/* required to force placement within parent *\/\r\n\tleft: 10px;\r\n\t\/* Rotation values 0, 1, 2, 3 represent 0, 90, 180, 270 degrees respectively *\/\r\n\tfilter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); \/* IE6-8 *\/\r\n\tzoom: 1; \/* 'hasLayout' required for filters *\/\r\n}\r\n<\/pre>\n<aside>Note: Both the IE- and non-IE versions require additional CSS to adjust spacing, and both require you to apply margins and padding as if the element were <em>not<\/em> rotated (<code>top: 10px;<\/code> will add 10 pixels to the &#8220;top&#8221; of the element, which is really the &#8220;end&#8221; of the line of text&#8230;).<\/aside>\n<div id=\"example1\">\n<p class=\"date\">Dec 31<\/p>\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\/rotate-text\/internet-explorer-filters\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":45,"menu_order":1,"comment_status":"open","ping_status":"open","template":"","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"class_list":["post-89","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/89","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=89"}],"version-history":[{"count":0,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/89\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/pages\/45"}],"wp:attachment":[{"href":"https:\/\/aarontgrogg.com\/practicalcss3\/wp-json\/wp\/v2\/media?parent=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}