<?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>Advanced CSS Design Resources - last-child.com &#187; Conditional Comment</title>
	<atom:link href="http://www.last-child.com/category/html-elements/conditional-comment/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.last-child.com</link>
	<description>CSS Toys for Professional Web Developers</description>
	<lastBuildDate>Mon, 19 Dec 2011 18:30:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>IE7.css is at 146 lines and counting&#8230;</title>
		<link>http://www.last-child.com/ie7css-is-at-146-lines-and-counting/</link>
		<comments>http://www.last-child.com/ie7css-is-at-146-lines-and-counting/#comments</comments>
		<pubDate>Sat, 20 May 2006 00:08:19 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Quick Tips]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ie7css-is-at-146-lines-and-counting/</guid>
		<description><![CDATA[How good is IE7? I was wondering about that today as I reloaded it to do another batch of bug fixing. The proof may be in your CSS pudding. We are using conditional comments to import either ie6.css or ie7.css to control our hacks. So far, the ie6 style sheet is 342 lines long, including [...]]]></description>
			<content:encoded><![CDATA[<p>How good is IE7? I was wondering about that today as I reloaded it to do another batch of bug fixing. The proof may be in your CSS pudding. </p>
<p>We are using <a href="http://www.456bereastreet.com/archive/200511/valid_downlevelrevealed_conditional_comments/">conditional comments </a>to import either ie6.css or ie7.css to control our hacks.<br />
<code lang="HTML"><br />
<! --[if IE 7]></p>
<link href="/css/ie7.css" type="text/css" rel="stylesheet" media="all"/>
<![endif]--><br />
<! --[if lte IE 6]></p>
<link href="/css/ie6.css" type="text/css" rel="stylesheet" media="all"/>
<![endif]-- ><br />
</code></p>
<p>So far, the ie6 style sheet is 342 lines long, including lots of whitespace and comments. A good portion of that is for re-assigning gif background images instead of png. The rest is an assortment of invoking <a href="http://rollyo.com/search.html?sourceid=Mozilla-search&#038;q=haslayout&#038;uid=4080&#038;sid=4886">hasLayout</a>, box model changes, and the ever-popular z-index bugs. </p>
<p>I copied this style sheet, commented everything out and began re-introducing the rules to build the IE7 style sheet. I ditched the gif and z-index hacks. The most common hacks are for <a href="http://rollyo.com/search.html?q=haslayout&#038;site=www.positioniseverything.net&#038;sid=4886">hasLayout</a> and double-margin float. I&#8217;m still using a set of hacks to re-configure my background images that are <a href="http://www.456bereastreet.com/archive/200511/valid_downlevelrevealed_conditional_comments/">being measured from the bottom up</a>.</p>
<p>So, how big is the IE7 style sheet? Right now, we are looking at 146 lines of code, including white space and comments.  That&#8217;s still a hefty amount and I&#8217;m not done fixing bugs.  Yes, IE7 is much better than IE6, but still a far cry from the others. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ie7css-is-at-146-lines-and-counting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE7 measuring sprites from bottom up?</title>
		<link>http://www.last-child.com/ie7-measuring-sprites-from-bottom-up/</link>
		<comments>http://www.last-child.com/ie7-measuring-sprites-from-bottom-up/#comments</comments>
		<pubDate>Wed, 03 May 2006 00:24:08 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[background]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Image Sprites]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ie7-measuring-sprites-from-bottom-up/</guid>
		<description><![CDATA[I&#8217;m doing some IE7 hacking and was wondering what was going on with some of my sprites. They look fine in all of the browsers except IE7. For that lovely browser, I say with my teeth clinched, I&#8217;m getting really strange results. At first I thought it was a hasLayout issue, that I needed to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some IE7 hacking and was wondering what was going on with some of my sprites. They look fine in all of the browsers except IE7. For that lovely browser, I say with my teeth clinched, I&#8217;m getting really strange results.  At first I thought it was a hasLayout issue, that I needed to do some messing around with the position:relative, or that it just didn&#8217;t like me.</p>
<p>However, while doing some troubleshooting, it looks like, <strong>please tell me I&#8217;m wrong</strong>, lE7 is measuring the sprite from the bottom up instead of the bottom down.</p>
<p>Here&#8217;s an example on <a href="http://tech.yahoo.com/pr/Apple-iMAC-G5-Desktop-Computer/1991804229">Yahoo! Tech</a>. You should see in the top product header 4 out of 5 blue stars for Pro Reviews and 5 out of 5 red stars for User Reviews. In IE7b, there are tiny nubbins from the tips of stars. </p>
<p><a href="http://us.tech5.yimg.com/tech.yahoo.com/images/20060430165459/bg-pro-ratings.png"> Here&#8217;s the background image (.png)</a> for the pro stars and the normal CSS for 4/5 stars:<br />
<code lang="CSS"><br />
.bigprostars4 span {width:100px; height:20px; top:0; background:url(/images/bg-pro-ratings.png) no-repeat 0 -50px;}<br />
</code></p>
<p>I began looking at the numbers, thinking they were off by a few pixels. After doing some testing of the positions, I realized that it was not measuring 50px down from the top, as other browsers handle sprites, but starting at the bottom of the image and measuring 50px up! Hence, displaying the tips of the small stars.</p>
<p>To fix this I added this style to the IE7.css (currently not live!) file:<br />
<code lang="CSS">.bigprostars4 span {width:100px; height:20px; top:0; background-position: 0 -400px;}</code></p>
<p>This is not a small issue. If you use sprites as extensively as I do, this involves opening every image and re-calculating the distance from the bottom up and inserting these numbers in an IE7 only style sheet.  Please, please tell me that I need to get another cup of coffee and I&#8217;m just dreaming this.   </p>
<h3>Update (05-02): Is this a position:absolute issue in IE7?</h3>
<p>I&#8217;m still seeing this bizarre activity in the sprites of absolutely positioned elements. The sprites of links and other objects that are not positioned are working fine. sigh&#8230;</p>
<h3>Update: IE7 passes sprite test (05-07)</h3>
<p>I&#8217;ve created a test page to see if I could narrow down the issues with IE7 and sprites. I was surprised to find <a href="http://www.last-child.com/ie7-passes-the-sprite-test/">IE7 passed my initial tests</a>. It must be a unique combination of styles causing my problem. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ie7-measuring-sprites-from-bottom-up/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add a conditional comment with XSL</title>
		<link>http://www.last-child.com/add-a-conditional-comment-with-xsl/</link>
		<comments>http://www.last-child.com/add-a-conditional-comment-with-xsl/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 17:26:21 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML Elements]]></category>
		<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://www.last-child.com/add-a-conditional-comment-with-xsl/</guid>
		<description><![CDATA[This is probably one of those posts that I&#8217;ll use a million times and everyone else will say&#8230; that&#8217;s nice. Here&#8217;s how you create a conditional comment for IE6 with xsl. you need to use an xsl:comment and a cdata and don&#8217;t add any extra spacing. IE6 only element, such as an image or css [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably one of those posts that I&#8217;ll use a million times and everyone else will say&#8230; that&#8217;s nice.  Here&#8217;s how you create a conditional comment for IE6 with xsl. you need to use an xsl:comment and a cdata and don&#8217;t add any extra spacing.</p>
<p><code lang="XML"><br />
<xsl:comment><![CDATA[[if lte IE 6]><br />
IE6 only element, such as an image or css file<br />
<![endif]]]&gt;</xsl:comment><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/add-a-conditional-comment-with-xsl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hacking to fix for IE7</title>
		<link>http://www.last-child.com/hacking-to-fix-for-ie7/</link>
		<comments>http://www.last-child.com/hacking-to-fix-for-ie7/#comments</comments>
		<pubDate>Mon, 27 Mar 2006 01:23:17 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:absolute]]></category>
		<category><![CDATA[:block]]></category>
		<category><![CDATA[:relative]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Image Sprites]]></category>

		<guid isPermaLink="false">http://www.last-child.com/hacking-to-fix-for-ie7/</guid>
		<description><![CDATA[I&#8217;ve played around with IE7 for a while, but haven&#8217;t really started debugging with it until now. Fortunately, I&#8217;ve already set up the site to use conditional comments and deliver an IE6.css file and a separate IE7.css file. This has made it much easier to target the offending areas of the site. IE7 has had [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve played around with IE7 for a while, but haven&#8217;t really started debugging with it until now.  Fortunately, I&#8217;ve already set up the site to use conditional comments and deliver an IE6.css file and a separate IE7.css file. This has made it much easier to target the offending areas of the site.</p>
<p>IE7 has had a couple surprising problems for me.  I have a topnav section that completely disappeared. The container div only has <em>position:relative</em> and inside are a number of floated elements. This actuall works great in all browsers&#8230; but IE7! <strong>No hacks for IE6, but hack for IE7!</strong> I went with the old adage, I think from <a href="http://www.andybudd.com/index.php">Andy Budd</a>, when all else fails float, if it&#8217;s already floated, unfloat.  I added <em>float:left </em> to the container div and the topnav re-appeared from the IE7 void.</p>
<h3>Munged Background Images</h3>
<p>I&#8217;m using a series of positioning,  text-indent, and background images on the site.  Here&#8217;s a simplified version:</p>
<p><code lang="CSS"><br />
.targetdl dd {position:relative;}<br />
.targetdl dd span {text-indent:-1000em; width:66px; display:block;  position:absolute; top:5px; right:20px;}<br />
.happy0 span {background:url(/images/happy0.png) no-repeat 0 -650px;}<br />
</code></p>
<p>IE7 shows the background image ok on some pages and on other pages, it shrinks the background image. I tried adding zoom:1 and font-size:100% to no avail. I&#8217;ll try line-height next.  This is an odd bug, but not the first time I noticed it on IE7 betas.  It certainly seems to be buggy with positioning. </p>
<h3>De-bugging Strategy</h3>
<p>Since I&#8217;ve already got a fairly solid ie6.css file, I&#8217;m going to use that as the basis of my IE7 CSS construction.  After fixing the topnav, the rest of the ie6.css file is going into the IE7 css and rules will be removed one at a time. This should help me figure out what is still needed.</p>
<p>I&#8217;ll keep notes on this site as I find it a convenient place to remember them. Has anyone else come across some positioning bugs in IE7? Sorry, no screen shots or details at this time, we&#8217;re still pre-alpha stage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/hacking-to-fix-for-ie7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Preparing for IE7 &#8211; Hacks and Conditional Comments</title>
		<link>http://www.last-child.com/preparing-for-ie7-hacks-and-conditional-comments/</link>
		<comments>http://www.last-child.com/preparing-for-ie7-hacks-and-conditional-comments/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 02:24:15 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.last-child.com/preparing-for-ie7-hacks-and-conditional-comments/</guid>
		<description><![CDATA[CSS filters and Hacks are so 2005 I think the future of CSS is not in hacks but looking seriously into using conditional comments. I’m saying this as someone that is trying to figure out the best approach for retrofitting older conversions. Conditional comments are IE statements that say if IE6 or any other version, [...]]]></description>
			<content:encoded><![CDATA[<h3><acronym title="Cascading Style Sheets">CSS</acronym> filters and Hacks are so 2005</h3>
<p>I think the future of <acronym title="Cascading Style Sheets">CSS</acronym> is not in hacks but looking seriously into using conditional comments. I’m saying this as someone that is trying to figure out the best approach for retrofitting older conversions.</p>
<p>Conditional comments are <acronym title="Internet Explorer">IE</acronym> statements that say if IE6 or any other version, use this additional <acronym title="Cascading Style Sheets">CSS</acronym> file. Non <acronym title="Internet Explorer">IE</acronym> Win browsers will ignore the comment.<br />
<code lang="HTML"><br />
<!--[if IE6]></p>
<link href="/ie6.css"  type="text/css" rel="stylesheet" media="all" />
<![endif]--><br />
</code></p>
<p>Or is the version less than or equal to IE6<br />
<code lang="HTML"><br />
<!--[if lte IE6]></p>
<link href="/ie6.css" type="text/css" rel="stylesheet" media="all" />
<![endif]--><br />
</code></p>
<h3>The Curveball</h3>
<p>IE7 is going to throw a curveball worthy of a World Series ring. While it is easy and more convenient to throw a “ <a href="http://blogs.msdn.com/ie/archive/2005/09/02/460115.aspx">* <acronym title="HyperText Markup Language">HTML</acronym></a> ” statement into a <acronym title="Cascading Style Sheets">CSS</acronym>, we need to start seriously looking at separating our hacks into different style sheets and intelligently using filters and conditional comments to refer to them.</p>
<p>Microsoft has announced that the IE7 browser will ignore past “ * <acronym title="HyperText Markup Language">HTML</acronym> “ filters that were used to send styles only to Internet Explorer and will respond to child selectors: “ <acronym title="HyperText Markup Language">HTML</acronym>>body “ which were used to hide styles from <acronym title="Internet Explorer">IE</acronym>. Therefore, IE7 will see the style sheets just as every other modern browser.</p>
<h3>Will this be an issue?</h3>
<p>If IE7 fixes its display problems, we may not have to make any changes to our legacy <acronym title="Cascading Style Sheets">CSS</acronym>. However, if IE7 brings new bugs to the table, we can no longer use filters to whisper in its ear. Conditional comments will be the answer.</p>
<p>I’m dreading the idea of inserting conditional comments into the head sections of <acronym title="HyperText Markup Language">HTML</acronym> pages. I’d like to insert it into the main.css file that imports more sophisticated styles. I have been overwhelmed lately and haven’t been able to test any answers to this. Does anyone have a suggestion?</p>
<p>Imagine teasing someone that their <acronym title="Cascading Style Sheets">CSS</acronym> is “So 2005!” Did I just coin a term? Has Joe Clark already coined this one?</p>
<h3>Resources</h3>
<ul>
<li><a href="http://blogs.msdn.com/ie/archive/2005/09/02/460115.aspx"><acronym title="Internet Explorer">IE</acronym> Blog</a></li>
<li><a href="http://www.quirksmode.org/blog/archives/2005/09/css_hacks_are_s_1.html">Quiks Mode</a></li>
</ul>
<p>&#8211; This post was originally published on <a xhref="http://www.tdrake.net" >www.tdrake.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/preparing-for-ie7-hacks-and-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE7 Beta 2 is out for developers to test</title>
		<link>http://www.last-child.com/ie7-beta-2-is-out-for-developers-to-test/</link>
		<comments>http://www.last-child.com/ie7-beta-2-is-out-for-developers-to-test/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 00:55:35 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[:hover]]></category>
		<category><![CDATA[attribute selector]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[first-child]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[Online Resource]]></category>
		<category><![CDATA[Standardista]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ie7-beta-2-is-out-for-developers-to-test/</guid>
		<description><![CDATA[IE7 Beta 2 is now available for developers to begin testing. I’ve been suggesting on the web standards group mailing list that people need to begin looking beyond 2005 and start coding for IE7 and 2006. That doesn’t mean you design for IE7 and hack for Firefox. No, it means you can begin using more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.microsoft.com/windows/IE/ie7/devwebchecklist.mspx">IE7 Beta 2</a> is now available for developers to begin testing.  I’ve been suggesting on the web standards group mailing list that people need to begin looking beyond 2005 and start coding for IE7 and 2006.  That doesn’t mean you design for IE7 and hack for Firefox. No, it means you can begin using more sophisticated <acronym title="Cascading Style Sheets">CSS</acronym> rules. Here’s a very brief summary of what I’ve seen with IE7 Beta 2 so far.</p>
<h3>Rolling out IE7</h3>
<p>Microsoft has an aggressive agenda to upgrade people from IE6 to IE7. By the end of Fall, we should see a significant percentage of our web site visitors using IE7 and by the end of the year, the majority of our traffic will be IE7.  Those without IE7 are machines with illegal copies of XP, people with XP Service Pack 1, and those that don’t accept Microsoft service updates.</p>
<h3>Use real <acronym title="Cascading Style Sheets">CSS</acronym></h3>
<p>If you are working on a site now, begin using real <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<ul>
<li>Use child selectors, first-child, <a href="http://www.tdrake.net/attribute-selectors-to-provide-language-information/">attribute selectors</a>, etc.</li>
<li>Hover your list items and more. IE7 supports the hover pseudoclass on more than the link.</li>
<li>IE7 offers full support of alpha transparent <acronym title="Portable Network Graphics">PNG</acronym> graphics, so begin using them as well.</li>
</ul>
<p>Forget what you knew about “* <acronym title="HyperText Markup Language">HTML</acronym>”, those hacks now belong in a style sheet that is introduced via a <a href="http://www.quirksmode.org/css/condcom.html">conditional comment</a>. <!-- The only hack you will need to know for IE7 is the *attribute hack  (*width:100px). All of the others -->They are <a href="http://blogs.msdn.com/ie/archive/2005/09/02/460115.aspx">gone, kaput, zilch</a>. Sure, they’ll still work on IE6, but you’re going to have one heck of a nightmare keeping track.</p>
<h3>Test Sites</h3>
<p>I am a big fan of <a href="http://www.stuffandnonsense.co.uk/">All that malarkey (Andy Clarke)</a>. However, his site is full of special rules for IE6 and its a great testing ground to see what IE7 chokes on and what it does as good as Firefox, Opera, and Safari. If your site is fairly hack free, you probably won’t notice a difference going from Firefox to IE7 Beta 2.  Start hunting around and finding the errors.</p>
<h3>What is still broken on IE7</h3>
<p>There are  two major issues that I have with IE7.</p>
<ol>
<li>No generated content. You can’t use <acronym title="Cascading Style Sheets">CSS</acronym> to add checkmarks to visited links, clearing containers spans, etc.</li>
<li>Double float margin still exists.  This can be fixed by adding display:inline to your floated objects when this problem occurs.</li>
<li>While I haven’t been able to nail down the specifics, there seems to be some bugginess with positioning absolute/relative.</li>
</ol>
<p>I’m sure there will be much better analysis of this launch by <a href="http://www.positioniseverything.net/">PositionIsEverything</a>, <a href="http://www.quirksmode.org/blog/index.html">Quirksmode</a>, and the <a href="http://blogs.msdn.com/ie/">IE7blog</a>. I hope these scribbled notes help you move forward.  IE7 is a good thing. It’s not perfect, but damn it sure is nice to ditch the <a title="a javascript that makes IE6 perform as if it understands the :hover pseudoclass" href="http://www.456bereastreet.com/archive/200405/son_of_suckerfish_dropdowns/">son of suckerfish javascript</a>, class=”firstitem”, haloed transparent gifs, et al.</p>
<p><ins>I forgot to mention, IE7 replaces IE6 on your computer. You need to have an extra computer to continue testing your pages in IE6. If you only have one windows box, I’d suggest keeping IE6 on that and just program for Firefox, et al and placing your IE6 hacks in a conditional comment linked style sheet</ins></p>
<p>&#8211; This was originally published on <a rel="bookmark" href="http://www.tdrake.net">tdrake.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ie7-beta-2-is-out-for-developers-to-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7 Hacks</title>
		<link>http://www.last-child.com/ie7-hacks/</link>
		<comments>http://www.last-child.com/ie7-hacks/#comments</comments>
		<pubDate>Sun, 26 Feb 2006 00:44:20 +0000</pubDate>
		<dc:creator>Ted</dc:creator>
				<category><![CDATA[Conditional Comment]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[IE7]]></category>

		<guid isPermaLink="false">http://www.last-child.com/ie7-hacks/</guid>
		<description><![CDATA[Microsoft has fixed much of the bugs that plagued IE6 and in the process removed the filters we used to target Internet Explorer in our CSS. As Lord God Martha would say, this is a good thing. However, there will be a time when you need to send a rule to IE7 and not to [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has fixed much of the bugs that plagued <abbr title="Internet Explorer 6">IE6</abbr> and in the process removed the filters we used to target Internet Explorer in our <acronym title="Cascading Style Sheets">CSS</acronym>. As <a href="http://marthastewart.com/page.jhtml;jsessionid=IQHCBLKQ0SIARWCKUUWSJBWYJKSS2JO0?type=learn-cat&#038;id=cat19294&#038;navLevel=3&#038;rsc=bottomnav">Lord God Martha</a> would say, this is a good thing.</p>
<p>However, there will be a time when you need to send a rule to IE7 and not to IE6. Or perhaps you need to send a rule to <abbr title="Internet Explorer 7">IE7</abbr> and to IE6. I’ve put together a test page of IE6 hacks to see what IE7 doesn’t walk right past. I’m condensing the test page into the paragraph below.</p>
<p>Luckily, there is a loophole for us and we can use this for “offroad use only.”  Why am I using this silly description?  Because you and I need to move beyond hacks. Place browser specific (<acronym title="Internet Explorer">IE</acronym>) in conditional comments or use a serverside script to place a class on the <acronym title="HyperText Markup Language">HTML</acronym>  or body (<acronym title="HyperText Markup Language">HTML</acronym> class=”ie6″ ) to target these browsers in your main <acronym title="Cascading Style Sheets">CSS</acronym> file.</p>
<p>However, these hacks will let you develop your <acronym title="Cascading Style Sheets">CSS</acronym> on the fly and fix your issues before going the proper route.</p>
<h3>Test Paragraph (condensed version of test page)</h3>
<p class="borderfun">this is the test paragraph to see how IE7 will handle hacks</p>
<ul>
<li>IE7 Beta2 understands #wrap>p.borderfun and applies correct color.</li>
<li>IE7 Beta2 ignores * <acronym title="HyperText Markup Language">HTML</acronym> p.borderfun styles.</li>
<li>IE7 Beta2 recognizes the * hack.</li>
<li>IE7 Beta2 ignores the underscore hack.</li>
<li>In Firefox, Safari, and Opera, you should see a red border. In IE7, you should see a black border. In IE6, you should see a pink border.</li>
</ul>
<h3>How to use this</h3>
<p>If you need to send something to IE6 and nothing else:  use the underscore attribute hack (_border:1px solid pink;) If you want to send something to IE7 AND IE6, use the *attribute hack (*border:1px solid black;). If you want to send something to IE7 and NOT IE6, use a combination (*border:1px solid black; _border:1px solid pink;).</p>
<h3>A call to arms</h3>
<p>Get out there kids and begin removing your * <acronym title="HyperText Markup Language">HTML</acronym> rules. Place those suckers in a conditional commented <acronym title="Cascading Style Sheets">CSS</acronym> file or at least begin replacing them with the underscore hack. When it comes time to tune for IE7, you’ll have less work to do.</p>
<p>&#8211; This was originally published on <a rel="bookmark" href="http://www.tdrake.net">tdrake.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.last-child.com/ie7-hacks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

