<?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>Nocturn vision &#187; CSS</title>
	<atom:link href="http://www.noctovis.net/blog/index.php/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.noctovis.net/blog</link>
	<description>A night's vision on .NET</description>
	<lastBuildDate>Fri, 16 Oct 2009 16:52:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Testing websites in different browsers</title>
		<link>http://www.noctovis.net/blog/index.php/2009/02/16/testing-websites-in-different-browsers/</link>
		<comments>http://www.noctovis.net/blog/index.php/2009/02/16/testing-websites-in-different-browsers/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 21:19:54 +0000</pubDate>
		<dc:creator>lailabougria</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.noctovis.net/blog/index.php/2009/02/16/testing-websites-in-different-browsers/</guid>
		<description><![CDATA[It&#8217;s a pain when your web application needs to look the same in several browsers. And I&#8217;m not really talking about pain if you need to support IE7 and Firefox. I&#8217;m talking about some serious headaches when you need to support IE6.
I&#8217;m refering to CSS hell. Actually, it&#8217;s not CSS that&#8217;s hell (although you need [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a pain when your web application needs to look the same in several browsers. And I&#8217;m not really talking about pain if you need to support IE7 and Firefox. I&#8217;m talking about some serious headaches when you need to support IE6.</p>
<p>I&#8217;m refering to CSS hell. Actually, it&#8217;s not CSS that&#8217;s hell (although you need to get used to it), it&#8217;s the damn browsers that don&#8217;t render as they should! And on top of that, ASP.NET also does a good job at screwing up your user interface sometimes (with all the hidden (not always so hidden) divs it renders).</p>
<p>I&#8217;ve recently had to do some serious CSS-ing on a friend&#8217;s website, and I&#8217;ve had a rough time.</p>
<h3>How I get it to look the same in all browsers</h3>
<p>1) Start out with Firefox<br />
If everything looks as it should in Firefox, you&#8217;re further than you&#8217;d think. Firefox is my default webbrowser, and it definitly should be yours to. Especially for web development.<br />
2) Follow with IE7 and IE8<br />
Probably, you&#8217;ll have to fix some issues, but they won&#8217;t keep you up during the night.<br />
3) Finish off with IE6 hell<br />
As a developer, you wouldn&#8217;t even think of it, but there are a loooooooot of people out there that are still using IE6. And I&#8217;m not talking only about people, but also about whole organizations. Depending on the target of your application, you can&#8217;t deny IE6.</p>
<h3>How I structure my CSS</h3>
<p>Generally speaking, I use several CSS files within a web application. I seperate the styles I use on my master page, from the styles I use on my pages, just to keep the CSS focussed.<br />
Apart from that, I have a seperate CSS file that contains IE fixes (mostly for IE6) and I only include it if the client is running IE6:</p>
<p>&lt;!&#8211;[if IE 6]&gt;<br />
   &lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;CSS/ie6Fix.css&#8221; media=&#8221;screen&#8221; /&gt;<br />
&lt;![endif]&#8211;&gt;</p>
<p>Apart from that, I have this rule: <strong>Never put style tags in your pages.</strong><br />
Fix everything in your CSS file. Don&#8217;t mix them. You&#8217;ll avoid weirdo CSS bugs and a clean seperation of your HTML and your CSS <img src='http://www.noctovis.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</p>
<h3>How to test in different browsers?</h3>
<p>I use Firefox, and IE7 on my computer. You could install IE6 using VirtualPC, but I prefer another way. I just came accross an interesting tool lately that allows you to test a web application in the most important IE versions. It&#8217;s called <a href="http://www.my-debugbar.com/wiki/IETester/HomePage" target="_blank">IETester</a>. It&#8217;s freeware and it allows you to test in IE5.5, IE6, IE7 and IE8! It&#8217;s still an alpha release, but it sure made my job easier. To be completely sure, I always try to test the web app on a pc running IE6, just to make sure. If the application should contain a bug, that would mean you&#8217;ve got a CSS bug, and that one is your responsibility. No excuses.</p>
<h3>Debugging tools (Updated 17/02/09)</h3>
<p>Prajwal Tuladhar just reminded me in his comment that I didn&#8217;t mention the tools I use for CSS debugging.<br />
Here they are:<br />
- <a href="http://getfirebug.com/" target="_blank">FireBug</a> for Firefox<br />
- <a href="https://addons.mozilla.org/nl/firefox/addon/60" target="_blank">Web developer toolbar </a>for Firefox<br />
- <a href="http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en" target="_blank">Internet explorer developer toolbar </a>for IE7 and IE8</p>
]]></content:encoded>
			<wfw:commentRss>http://www.noctovis.net/blog/index.php/2009/02/16/testing-websites-in-different-browsers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
