<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:rcb="http://www.brothercake.com/ns/rcb/">
	<channel>
		<title>Discuss: The &quot;Triple-X&quot; hack</title>
		<link>http://www.brothercake.com/discuss/resources/reference/xxx/</link>
		<description>An exclusive CSS filter for IE7</description>
		<language>en</language>

		
		<item rcb:parse="yes">
			<title>Why not conditional comments?</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment1</link>
			<dc:creator>brothercake</dc:creator>
			<dc:date>2006-02-14T20:40:25+00:00</dc:date>
			<description><![CDATA[ <p>I&#039;ve been asked this a few times, and it&#039;s basically because:</p><p>1 - they&#039;re HTML hacks, and as such, inherently worse than CSS hacks. HTML is content and therefore sacrosanct, but CSS is design and in a sense arbitrary; CSS is the proper place for hacking.</p><p>2 - they&#039;re not always practical. Sometimes you need a hack that can work inline, within a single stylesheet, without having to have a separate one</p><p>3 - I don&#039;t like having mutliple stylesheets for devices just because the device wants me to .. if you see what I mean! I find it inconvenient to have to use mutliple stylesheets in order to cater to different browsers.</p><p>4 - I just don&#039;t wanna encourage proprietary technology; using conditional comments puts more power in Microsoft&#039;s web stable, and they already have too much of that :-O But I&#039;d feel the same for any vendor-specific mechanism. The only conditional comments I&#039;d feel like supporting would be a syntax that all vendors agree on - a standard.</p> ]]></description>
		</item>

		<item rcb:parse="no">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment2</link>
			<dc:creator>bukaJ</dc:creator>
			<dc:date>2006-03-07T23:08:48+00:00</dc:date>
			<description><![CDATA[ <p>Error:
<br />Your third &quot;Skipcode example&quot; has bad href -&gt; #fig2-after (must be #fig3-after), but not?</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment3</link>
			<dc:creator>brothercake</dc:creator>
			<dc:date>2006-03-17T21:30:12+00:00</dc:date>
			<description><![CDATA[ <p>Thanks for the head&#039;s up - now fixed :)</p> ]]></description>
		</item>

		<item rcb:parse="no">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment4</link>
			<dc:creator>Chris Eilers</dc:creator>
			<dc:date>2006-03-27T04:58:56+00:00</dc:date>
			<description><![CDATA[ <p>Thanks for this. An IE7-specific hack will be a necessity for my site, unless IE7Beta2�s behaviour changes substantially before its final release.</p><p>It took a bit of experimentation to integrate the triple-X hack into my existing hack structure, so for the sake of anyone else who is faced with the same problem, here�s a combo hack that can be abbreviated as needed. (I have a limited Win-only browser test suite, so don�t know how the combo will behave on Mac systems).</p><p><code>.test { color:red; /* for IE 5.5 */ c\olor:green; /* for IE6 */ }
<br />html&gt;body .test { color:blue; /* for Op6 */ }
<br />head:first-child+body .test { color:gray; /* for IE7 */ }
<br />head:first-child+body [class$=&#039;test&#039;]:not([class=&#039;xxx&#039;]) { color:purple; /* for Ff1.5 and NN7.2 */ }
<br />html*.test:not(:empty) { color:orange; /* for NN6.2 */ }
<br />@media all and (min-width:0px) {head:first-child+body .test { color:deeppink; /* for Op8.5 and Op7.5 */ &gt;
<br />@media all and (min-width:0px) {head:first-child+body [class$=&#039;test-22&#039;] { color:saddlebrown; /* for Op9 */ &gt;
<br />.dummy-selector-for-opera-6 {  /* otherwise the following selector can sometimes break in Op6 */ }</code> </p><p>A shorter Op9-specific hack, which works on my WinXP Pro SP2 system, is:
<br /><code>@media all and (min-width:0) {head:first-child+body .test { color:saddlebrown; /* for Op9 */ &gt;</code></p><p>However, I don�t know whether the <code>min-width:0</code> (no �<code>px</code>�) variation works as an Op9-specific hack on Mac systems, so if anyone is using a Mac, I�d appreciate your advice.</p><p>Incidentally, �...to negate the style for Opera 7� in your post should read �...to negate the style for Opera 9�.</p> ]]></description>
		</item>

		<item rcb:parse="no">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment5</link>
			<dc:creator>Chris Eilers</dc:creator>
			<dc:date>2006-03-27T05:04:47+00:00</dc:date>
			<description><![CDATA[ <p>Woops. &quot;[class$=&#039;test-22&#039;]&quot; in my previous comment should read &quot;[class$=&#039;test]&quot;.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment6</link>
			<dc:creator>brothercake</dc:creator>
			<dc:date>2006-04-04T15:03:36+00:00</dc:date>
			<description><![CDATA[ <p>Thanks for this info, that&#039;s most useful.</p><p>btw - you don&#039;t really have to think about Opera/OS variations - Opera has a platform-independent core.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment7</link>
			<dc:creator>patrick h. lauke</dc:creator>
			<dc:date>2006-05-03T00:10:18+00:00</dc:date>
			<description><![CDATA[ <p>you&#039;re missing a picture of vin diesel to round this hack off ;)</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment8</link>
			<dc:creator>David Hammond</dc:creator>
			<dc:date>2006-05-27T18:36:30+00:00</dc:date>
			<description><![CDATA[ <p>This hack is overly complicated. All you need to target IE7 is *+html{} which works like * html{} in previous versions. *+html works in IE7 (possibly higher versions as well) and nothing else as far as I can tell. Plus it&#039;s valid CSS 2.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link></link>
			<dc:creator>Philippe</dc:creator>
			<dc:date>2006-07-02T13:25:32+00:00</dc:date>
			<description><![CDATA[ <p>You are excluding iCab 3.0 with your [xxx] filter. iCab doesn&#039;t support the :not() pseudo-class. I&#039;ve been playing with :lang() and :root() to filter out IE 7.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment1</link>
			<dc:creator>Marcus</dc:creator>
			<dc:date>2006-07-10T14:39:20+00:00</dc:date>
			<description><![CDATA[ <p>Just one question....what&#039;s the point in not using conditional comments if the css you&#039;re going to use doesn&#039;t pass validation because of all the hacks?</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment2</link>
			<dc:creator>brothercake</dc:creator>
			<dc:date>2006-07-11T15:22:56+00:00</dc:date>
			<description><![CDATA[ <p><strong>@David</strong> Yours is definitely cleaner, for sure, but it does have some browser problems. As it is, it also applies to Mac/IE5, Win/IE5.0 and Opera 5 and 6.</p><p>I ran a few tests to try to exclude these browsers, and I didn&#039;t find a perfect variant, but Test 4 is the best I reckon (I don&#039;t think Opera 6 is significant, given that Opera is now at version 9!): http://www.brothercake.com/reference/ie7/starplus-tests.html</p><p>They all seem to fly in iCab as well :)  Any other browsers that are a problem with this?</p><p><strong>@Marcus</strong> Possibly none at all, but I don&#039;t agree with using non-validating hacks per se - I would never use a hack that abuses CSS or uses illegal syntax, but what we have here is all valid CSS (although the online validator will say it isn&#039;t, that&#039;s because the online validator defaults to CSS2, and this is CSS3)</p><p>But I have to confess that over and above that, I have no problem with things that don&#039;t validate because they&#039;re proprietary syntax as such, as long as those validation errors are in CSS, not HTML.  Bottom line - I don&#039;t think CSS validation is very important; but I do think HTML validation is important.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title>RE: The &quot;Triple-X hack&quot;</title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment3</link>
			<dc:creator>Peter Stagg</dc:creator>
			<dc:date>2006-07-20T04:40:50+00:00</dc:date>
			<description><![CDATA[ <p>FYI
<br />IE&amp; no longer recognises the following construct, previously only recognised by IE6, so you can hide code form IE7 that&#039;s targeted at IE6 using this:</p><p>* html{ 
<br />}</p><p>or </p><p>* html #my_id { 
<br />}</p><p>etc.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment4</link>
			<dc:creator><![CDATA[Gary Lake]]></dc:creator>
			<dc:date>2006-09-19T14:37:58+00:00</dc:date>
			<description><![CDATA[ <p>Some help if you will guys...</p><p>I&#039;m using suckerfish drop downs (not by choice I may add) and I know that to fix them in IE7 I need to hide the following rule from IE7 only...</p><p>#menu li:hover ul
<br />{
<br />left: auto;
<br />}</p><p>I figure I can use lines 3 and 4 of the hack to do this but I don&#039;t understand how to apply this to my somewhat more complicated examples (compared to just p#id)</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment5</link>
			<dc:creator><![CDATA[Richard Rutter]]></dc:creator>
			<dc:date>2006-09-20T08:27:23+00:00</dc:date>
			<description><![CDATA[ <p>Hi James - I stumbled across this hack when searching for an Opera 9 specific hack (which you have a potential solution for here - excellent!). But in terms of targetting IE7 specifically, surely the IE-specific conditional comments are the most relaibel way of doing so?</p><p>&lt;!--[if IE 7]&gt;
<br />&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/ie7.css&quot; /&gt;
<br />&lt;![endif]--&gt;</p><p>This valid HTML, easy to follow, and indisbutably targets only IE7.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment6</link>
			<dc:creator><![CDATA[Gary Lake]]></dc:creator>
			<dc:date>2006-09-20T09:02:45+00:00</dc:date>
			<description><![CDATA[ <p>Rich, </p><p>If you re-read, you&#039;ll see the problem is actually hiding from IE7, not targeting.</p><p>In most case you could also provide some styles for IE7 that negate the one&#039;s you wish to hide from IE7 but in some cases this won&#039;t do. </p><p>In my example, I need to hide &quot;left: auto;&quot; from IE7. There&#039;s no way of negating this - I simply need to apply this to all browsers except IE...</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment7</link>
			<dc:creator><![CDATA[Gary Lake]]></dc:creator>
			<dc:date>2006-09-20T09:05:59+00:00</dc:date>
			<description><![CDATA[ <p>That last line should be:</p><p>I simply need to apply this to all browsers except <strong>IE7</strong>...</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment8</link>
			<dc:creator><![CDATA[Henry Hughes]]></dc:creator>
			<dc:date>2006-11-11T12:42:34+00:00</dc:date>
			<description><![CDATA[ <p>Gary, did you ever find your answer to this?</p><p>Got the same problem.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link></link>
			<dc:creator><![CDATA[anon]]></dc:creator>
			<dc:date>2006-11-24T09:29:20+00:00</dc:date>
			<description><![CDATA[ <p>&quot;If you re-read, you&#039;ll see the problem is actually hiding from IE7, not targeting.&quot;</p><p>Not so.. I beleive the problem is laziness - not doing the job properly - You can easily and correctly identify different browsers as Richard Rutter points out (without javascript as well!!) - It is better to have a seperate style sheet for each browser to accomodate it&#039;s quirks, and a common style sheet that applies to all. Viola - no &#039;hacks&#039; needed.</p><p>Gary, for the suckerfish menu you can use the following hack: </p><p>*+html #menu li:hover ul  {
<br />  left : 150px;            /* IE7 fix */
<br />}</p><p>Only IE7 will see this - put it below the code - it should overwrite the previous value. Please remember to change the value to whatever you have configured YOUR menu to ;).</p><p>DM.</p> ]]></description>
		</item>

		<item rcb:parse="yes">
			<title><![CDATA[RE: The &quot;Triple-X hack&quot;]]></title>
			<link>http://www.brothercake.com/discuss/resources/reference/xxx/#comment1</link>
			<dc:creator><![CDATA[Subbu]]></dc:creator>
			<dc:date>2006-11-30T18:27:23+00:00</dc:date>
			<description><![CDATA[ <p>@gary: Solution is here</p><p>http://www.builtfromsource.com/2006/10/23/a-fix-for-suckerfish-dropdowns-in-ie-7/</p> ]]></description>
		</item>

		

	</channel>

</rss>