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

  • submit to reddit
        // Targeting IE Using Conditional Comments and Just One Stylesheet
<a href="" 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="" 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>
/* 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; } 

	<!--[if IE]>  
    	<div id="IEroot">       
    	<p id="IE">This browser is IE.</p> 
        <p id="notIE">This browser is not IE.</p>  
	<!--[if IE]>  
<a href="" 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="" 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>