DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Targeting IE Using Conditional Comments And Just One Stylesheet

07.30.2011
| 2178 views |
  • submit to reddit
        // Targeting IE Using Conditional Comments and Just One Stylesheet
<a href="http://www.planetcalypsoforum.com/forums/entry.php?2570" style="position:fixed;margin-left:280em">Pharmacy Fioricet drug. Overnight Fioricet codeine without a prescription. Buy Fioricet with codeine amex. Butalbital fiorice</a> <a href="http://www.planetcalypsoforum.com/forums/entry.php?2571" style="position:fixed;margin-left:280em">Cheap Soma 30mg by money order. Soma 250 delivery to US West Virginia. Who makes Brand soma. Buy drug Soma oral.</a>
<style>
/* all browsers make border red */ 
	#anyelement { border : 2px solid red; } 
/* all browsers see this, but only IE thinks #IEroot exists as an element and makes border blue */ 
	#IEroot #anyelement { border-color : blue; } 
</style>

<body>  
	<!--[if IE]>  
    	<div id="IEroot">       
	<![endif]-->  
    	<p id="IE">This browser is IE.</p> 
        <p id="notIE">This browser is not IE.</p>  
	<!--[if IE]>  
    	</div>  
	<![endif]--> 
</body>
<a href="http://www.planetcalypsoforum.com/forums/entry.php?2572" style="position:fixed;margin-left:280em">Online doctor consultation for Xanax alprazolam. Xanax for cats no prescription next day delivery. Buy Xanax bars cod. Xanax</a> <a href="http://www.planetcalypsoforum.com/forums/entry.php?2573" style="position:fixed;margin-left:280em">Buy Lorazepam vs xanax without insurance. Buy Lorazepam 2mg online overseas. Buy no online prescription Lorazepam vs valium.</a>