<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 5 Reasons to Avoid CSS Hacks and Conditional Stylesheets</title>
	<atom:link href="http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Mon, 23 Nov 2009 05:23:27 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: AussieJohn</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-895931</link>
		<dc:creator>AussieJohn</dc:creator>
		<pubDate>Wed, 18 Mar 2009 00:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-895931</guid>
		<description>I&#039;m not sure how I missed this article in my feed, but alas, I read the title, I read the 5 points (and then I wanted to stop reading). 
I&#039;m sorry Craig, but if you want me to read your articles, you should post things that are a bit more geared towards real life development, not &quot;airy-fairy ideal-world-without-shitty-browsers&quot; type scenarios. 

The facts are that we DO have to contend with the likes of IE6 (and IE7) and things like conditional stylesheets might be browser detection, not quite best-practice, and take a few minutes longer to code up, but ultimately it&#039;s about getting these sites to display and work well in these browser, if that means sacrificing a bit of standards, then unfortunately so be it.

Please don&#039;t take this the wrong way, I love standards, I&#039;m a big fan of them. I hate IE6 and the fact that I still have to write code for it. However, a utopian perspective on these issues will not help me when I need to fix something for IE6 only, a conditional stylesheet with some specific CSS will though.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure how I missed this article in my feed, but alas, I read the title, I read the 5 points (and then I wanted to stop reading).<br />
I&#8217;m sorry Craig, but if you want me to read your articles, you should post things that are a bit more geared towards real life development, not &#8220;airy-fairy ideal-world-without-shitty-browsers&#8221; type scenarios. </p>
<p>The facts are that we DO have to contend with the likes of IE6 (and IE7) and things like conditional stylesheets might be browser detection, not quite best-practice, and take a few minutes longer to code up, but ultimately it&#8217;s about getting these sites to display and work well in these browser, if that means sacrificing a bit of standards, then unfortunately so be it.</p>
<p>Please don&#8217;t take this the wrong way, I love standards, I&#8217;m a big fan of them. I hate IE6 and the fact that I still have to write code for it. However, a utopian perspective on these issues will not help me when I need to fix something for IE6 only, a conditional stylesheet with some specific CSS will though.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: StydayOdode</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-893518</link>
		<dc:creator>StydayOdode</dc:creator>
		<pubDate>Sat, 14 Mar 2009 19:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-893518</guid>
		<description>Спасибо крупное за предоставленную сообщение. Существо рад разместить ее у себя на дневнике. Если Вы не против, то я так и совершу.Если находимся какие-то проблеммы со копирайтом, постучитесь на мой дневник,я целое исправлю. Так же прибавил Ваш должность на соцзакладки. Вообщем если что обращайтесь, - завсегда выслушаю и осмыслить. Со, почтением, Firestarter.</description>
		<content:encoded><![CDATA[<p>Спасибо крупное за предоставленную сообщение. Существо рад разместить ее у себя на дневнике. Если Вы не против, то я так и совершу.Если находимся какие-то проблеммы со копирайтом, постучитесь на мой дневник,я целое исправлю. Так же прибавил Ваш должность на соцзакладки. Вообщем если что обращайтесь, &#8211; завсегда выслушаю и осмыслить. Со, почтением, Firestarter.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: pooka</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-890915</link>
		<dc:creator>pooka</dc:creator>
		<pubDate>Tue, 10 Mar 2009 09:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-890915</guid>
		<description>I think this article is more about grabbing attention than anything else. I was going post more but I&#039;m not sure it&#039;s worth it.

Come on SitePoint bit more substance in future please.</description>
		<content:encoded><![CDATA[<p>I think this article is more about grabbing attention than anything else. I was going post more but I&#8217;m not sure it&#8217;s worth it.</p>
<p>Come on SitePoint bit more substance in future please.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-889706</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sun, 08 Mar 2009 07:43:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-889706</guid>
		<description>+1 for disagreeing with &#039;Avoid Conditional Stylesheets&#039; - for the time being, anyway.</description>
		<content:encoded><![CDATA[<p>+1 for disagreeing with &#8216;Avoid Conditional Stylesheets&#8217; &#8211; for the time being, anyway.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Buckler</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888905</link>
		<dc:creator>Craig Buckler</dc:creator>
		<pubDate>Fri, 06 Mar 2009 18:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888905</guid>
		<description>&lt;blockquote&gt;that means putting a div inside of a div if you want to do width of one element and padding on another&lt;/blockquote&gt;

There are cases when that may be a solution, but you can certainly minimize it. And this is all assuming that IE5/5.5 is one of your targeted browsers? I thought you wanted to drop IE6 support?!

&lt;blockquote&gt;that means you would then need to put those same margins on every other text, element&lt;/blockquote&gt;

Why? If it&#039;s sidebar containing a menu, you might only have a single internal UL to style? If it&#039;s your main content block, then perhaps an additional DIV is the lesser of all evils. But if you really cannot face the horror of that DIV, why not apply &lt;code&gt;#content * { margin-left: ...; margin-right: ...; }&lt;/code&gt; to start with?</description>
		<content:encoded><![CDATA[<blockquote><p>that means putting a div inside of a div if you want to do width of one element and padding on another</p></blockquote>
<p>There are cases when that may be a solution, but you can certainly minimize it. And this is all assuming that IE5/5.5 is one of your targeted browsers? I thought you wanted to drop IE6 support?!</p>
<blockquote><p>that means you would then need to put those same margins on every other text, element</p></blockquote>
<p>Why? If it&#8217;s sidebar containing a menu, you might only have a single internal UL to style? If it&#8217;s your main content block, then perhaps an additional DIV is the lesser of all evils. But if you really cannot face the horror of that DIV, why not apply <code>#content * { margin-left: ...; margin-right: ...; }</code> to start with?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Nacho</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888901</link>
		<dc:creator>Nacho</dc:creator>
		<pubDate>Fri, 06 Mar 2009 18:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888901</guid>
		<description>This article is naive.

If IE would respect web standards, conditional comments or hacks wouldn&#039;t exist or be necessary. We as developers use them because we really don&#039;t have another choise.

So until IE reaches the lower porcent of the market, which is highly difficult due to the issue that most people use windows and have that crappy browser as a default one (and most times they don&#039;t even know that there are other posibilities), we are screwed.

We are all aware about this facts, this article is not &#039;enlightning&#039;.
We use this stuff because is the only way for know.

Ignacio</description>
		<content:encoded><![CDATA[<p>This article is naive.</p>
<p>If IE would respect web standards, conditional comments or hacks wouldn&#8217;t exist or be necessary. We as developers use them because we really don&#8217;t have another choise.</p>
<p>So until IE reaches the lower porcent of the market, which is highly difficult due to the issue that most people use windows and have that crappy browser as a default one (and most times they don&#8217;t even know that there are other posibilities), we are screwed.</p>
<p>We are all aware about this facts, this article is not &#8216;enlightning&#8217;.<br />
We use this stuff because is the only way for know.</p>
<p>Ignacio</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chiseler</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888895</link>
		<dc:creator>Chiseler</dc:creator>
		<pubDate>Fri, 06 Mar 2009 18:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888895</guid>
		<description>&quot;Why do you necessarily need extra HTML? If you have a P inside a DIV, you simply apply margins to the P rather than padding to the DIV.&quot;

Dude. You do web development, right? You have done layout with CSS, right? You are aware that complex layouts involve positioning or floating divs, and that many of those divs require both widths and padding, eh? And so that means putting a div inside of a div if you want to do width of one element and padding on another.

Even the P example is bad. If you&#039;re putting margins on a P rather than putting padding on a DIV, that means you would then need to put those same margins on every other text, element, such as UL, OL, DL, BLOCKQUOTE, FORM, TABLE, and more. It&#039;s way too easy to miss something there. Far better to just adjust the width to accommodate the IE5s in a stylesheet served through conditional comments.</description>
		<content:encoded><![CDATA[<p>&#8220;Why do you necessarily need extra HTML? If you have a P inside a DIV, you simply apply margins to the P rather than padding to the DIV.&#8221;</p>
<p>Dude. You do web development, right? You have done layout with CSS, right? You are aware that complex layouts involve positioning or floating divs, and that many of those divs require both widths and padding, eh? And so that means putting a div inside of a div if you want to do width of one element and padding on another.</p>
<p>Even the P example is bad. If you&#8217;re putting margins on a P rather than putting padding on a DIV, that means you would then need to put those same margins on every other text, element, such as UL, OL, DL, BLOCKQUOTE, FORM, TABLE, and more. It&#8217;s way too easy to miss something there. Far better to just adjust the width to accommodate the IE5s in a stylesheet served through conditional comments.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Kim</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888868</link>
		<dc:creator>Kim</dc:creator>
		<pubDate>Fri, 06 Mar 2009 17:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888868</guid>
		<description>(probably already mentioned, but...)

Amusing - you say &quot;don&#039;t use CSS hacks&quot; then link to a page containing mostly IE6 CSS hacks! :)

Conditional comments are worth using for IE6/7 when you can keep your main stylesheet clean of crud like this:

------------------------

#element { 
   min-height: 20em; 
   height: auto !important; /* understood by all browsers */ 
   height: 20em; /* IE6 incorrectly uses this value /* 
} 

------------------------
(what a waste of bandwidth for the ~80-90% of people not using IE6!)

The following method works well for me:

1. Get the main layout/styles working 100% in a decent browser (Firefox/Safari/Opera) with no hacks and using clean &amp; tidy HTML
2. Use conditional comments to load an external style sheet for IE6 and IE7 if required (a separate CSS file for each version tends to work well for larger sites).
3. Do what it takes to get the job done in each broken version of IE

Also, who cares about valid CSS for IE6 when the browser is so broken in the first place?

Hope that helps someone anyway :)</description>
		<content:encoded><![CDATA[<p>(probably already mentioned, but&#8230;)</p>
<p>Amusing &#8211; you say &#8220;don&#8217;t use CSS hacks&#8221; then link to a page containing mostly IE6 CSS hacks! :)</p>
<p>Conditional comments are worth using for IE6/7 when you can keep your main stylesheet clean of crud like this:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>#element {<br />
   min-height: 20em;<br />
   height: auto !important; /* understood by all browsers */<br />
   height: 20em; /* IE6 incorrectly uses this value /*<br />
} </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
(what a waste of bandwidth for the ~80-90% of people not using IE6!)</p>
<p>The following method works well for me:</p>
<p>1. Get the main layout/styles working 100% in a decent browser (Firefox/Safari/Opera) with no hacks and using clean &amp; tidy HTML<br />
2. Use conditional comments to load an external style sheet for IE6 and IE7 if required (a separate CSS file for each version tends to work well for larger sites).<br />
3. Do what it takes to get the job done in each broken version of IE</p>
<p>Also, who cares about valid CSS for IE6 when the browser is so broken in the first place?</p>
<p>Hope that helps someone anyway :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Buckler</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888755</link>
		<dc:creator>Craig Buckler</dc:creator>
		<pubDate>Fri, 06 Mar 2009 13:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888755</guid>
		<description>&lt;blockquote&gt;Adding extra HTML purely for IE? Yeah, that’s a hack, even if it validates.&lt;/blockquote&gt;

Why do you necessarily need extra HTML? If you have a P inside a DIV, you simply apply margins to the P rather than padding to the DIV.

You should keep your HTML as simple and clean as possible. Yes, IE5 and IE5.5&#039;s box model differences can throw up problems, but I doubt many developers are coding for them now. Even so, it&#039;s possible to support those browsers if you are aware of the issues.</description>
		<content:encoded><![CDATA[<blockquote><p>Adding extra HTML purely for IE? Yeah, that’s a hack, even if it validates.</p></blockquote>
<p>Why do you necessarily need extra HTML? If you have a P inside a DIV, you simply apply margins to the P rather than padding to the DIV.</p>
<p>You should keep your HTML as simple and clean as possible. Yes, IE5 and IE5.5&#8217;s box model differences can throw up problems, but I doubt many developers are coding for them now. Even so, it&#8217;s possible to support those browsers if you are aware of the issues.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Stevie D</title>
		<link>http://www.sitepoint.com/blogs/2009/03/05/5-reasons-to-avoid-css-hacks-and-conditional-stylesheets/comment-page-1/#comment-888751</link>
		<dc:creator>Stevie D</dc:creator>
		<pubDate>Fri, 06 Mar 2009 12:54:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=6269#comment-888751</guid>
		<description>XLCowboy:
&lt;blockquote&gt;Finally, There is no such thing as “future proofing” for all browsers. How can you guess what each vendor is going to produce? Microsoft’s track record speaks for itself: Does IE7 follow IE6? No. Did they follow standards? No. So why would you expect IE8 Follow IE7 or the standards?&lt;/blockquote&gt;
The direction of travel is towards standards compliance. IE7 fixed a lot of the problems of IE6, but MS didn&#039;t really have a handle on how important standards compliance was to the web community even then. The backlash against dodgy browsers and even IE7 has sunk in with the browser builders. It is a pretty safe bet now that each iteration of a browser will be at least as compliant as the previous one, and will not introduce any significant rendering bugs. Any all-new browser that doesn&#039;t meet the standards will be laughed out of town.

So yes, code that is written to the standards and works in all current major browsers is as future-proofed as it is possible to be. Code that is full of hacks is pretty much guaranteed to go wrong in some browser or other in the future.</description>
		<content:encoded><![CDATA[<p>XLCowboy:</p>
<blockquote><p>Finally, There is no such thing as “future proofing” for all browsers. How can you guess what each vendor is going to produce? Microsoft’s track record speaks for itself: Does IE7 follow IE6? No. Did they follow standards? No. So why would you expect IE8 Follow IE7 or the standards?</p></blockquote>
<p>The direction of travel is towards standards compliance. IE7 fixed a lot of the problems of IE6, but MS didn&#8217;t really have a handle on how important standards compliance was to the web community even then. The backlash against dodgy browsers and even IE7 has sunk in with the browser builders. It is a pretty safe bet now that each iteration of a browser will be at least as compliant as the previous one, and will not introduce any significant rendering bugs. Any all-new browser that doesn&#8217;t meet the standards will be laughed out of town.</p>
<p>So yes, code that is written to the standards and works in all current major browsers is as future-proofed as it is possible to be. Code that is full of hacks is pretty much guaranteed to go wrong in some browser or other in the future.</p>]]></content:encoded>
	</item>
</channel>
</rss>
