<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Standards Tips &#187; internet explorer</title>
	<atom:link href="http://webstandardstips.com/tag/internet-explorer/feed/" rel="self" type="application/rss+xml" />
	<link>http://webstandardstips.com</link>
	<description>Practical advice for building websites with web standards</description>
	<lastBuildDate>Mon, 08 Mar 2010 13:39:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>CSS hacks for IE-only style rules</title>
		<link>http://webstandardstips.com/2008/11/18/css-hacks-for-ie-only-style-rules/</link>
		<comments>http://webstandardstips.com/2008/11/18/css-hacks-for-ie-only-style-rules/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 16:42:25 +0000</pubDate>
		<dc:creator>Isofarro</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[css property]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[star]]></category>
		<category><![CDATA[underscore]]></category>

		<guid isPermaLink="false">http://www.webstandardstips.com/?p=8</guid>
		<description><![CDATA[The bane of CSS is IE6 and IE7 support, and most of the times they need a few extra styles to make things work. But those additional styles can mess up other browsers. Ideally we would want to have those styles only given to Internet Explorer. There are two hacks I typically use to filter [...]]]></description>
			<content:encoded><![CDATA[<p>The bane of CSS is IE6 and IE7 support, and most of the times they need a few extra styles to make things work. But those additional styles can mess up other browsers. Ideally we would want to have those styles only given to Internet Explorer.</p>
<p>There are two hacks I typically use to filter style rules just for IE. The choice between them depends on whether a style rule needs to be seen by IE7 or not. Both hacks are CSS rule prefix hacks &#8211; just tack it on the start of the property in each case. These two hacks are:</p>
<ul>
<li>The underscore prefix (<code>_width: 100%</code>). This style-rule is seen by IE6, but not IE7.</li>
<li>The star/asterisk prefix (<code>*width: 100%</code>). This style-rule is seeen by both IE6 and IE7.</li>
</ul>
<p>The judicious use of the underscore and star prefixes is sufficient to deal with most IE6 and IE7 issues. So:</p>
<ul>
<li>To target just IE6, use just the underscore.</li>
<li>To target both IE6 and IE7, use the star/asterisk.</li>
<li>To target only IE7, use the star/asterisk to set the IE7 specific style, and use the underscore to undo that style in IE6.</li>
</ul>
<p>This is fine when all that&#8217;s needed is the odd IE fix here and there. As the number of IE-specific style-rules increases it is worth using conditional comments to bring in IE specific stylerules, either as an additional stylesheet, or a full stylesheet with the IE-specific rules appended (created via a build process).</p>
]]></content:encoded>
			<wfw:commentRss>http://webstandardstips.com/2008/11/18/css-hacks-for-ie-only-style-rules/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

