Internet Explorer Filters

Internet Explorer Filters are a pure CSS implementation that, when used in conjunction with the HTML5 Boilerplate <html> conditional comments, requires no hacks and (almost) validates perfectly!

Note that this CSS will not validate because filter is invalid. If validation is important to you, this could be served via an IE-only stylesheet.

There are two separate IE filters that handle opacity, one for IE6 and 7, and another for IE8. (Scrapped the -ms-filter… who needs it?)

#example1 p {
	margin-left: 30px;
}
#example1 p.date {
	background: red;
	margin: 0;
	position: absolute; /* required to force placement within parent */
	top: 35px;
	left: 0;
	-moz-transform: rotate(-90deg); /* FF */
	-o-transform: rotate(-90deg); /* Opera */
	-webkit-transform: rotate(-90deg); /* Safari and Chrome */
	transform: rotate(-90deg); /* IE9+, W3C */
}
html.lte8 #example1 p.date {
	top: 25px; /* required to force placement within parent */
	left: 10px;
	/* Rotation values 0, 1, 2, 3 represent 0, 90, 180, 270 degrees respectively */
	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE6-8 */
	zoom: 1; /* 'hasLayout' required for filters */
}

Dec 31

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.

One Response to Internet Explorer Filters

Leave a Reply

Your email address will not be published. Required fields are marked *