<?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>Onyx Design Weblog &#187; Browsers</title>
	<atom:link href="http://www.onyx-design.net/category/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onyx-design.net</link>
	<description>A weblog about webdesign, webdevelopment, css, php and other webrelated topics.</description>
	<lastBuildDate>Thu, 03 Jun 2010 15:34:25 +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>CSS coding for cross browser compatibility</title>
		<link>http://www.onyx-design.net/featured/css-coding-for-cross-browser-compatibility/</link>
		<comments>http://www.onyx-design.net/featured/css-coding-for-cross-browser-compatibility/#comments</comments>
		<pubDate>Mon, 12 May 2008 10:11:06 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://www.onyx-design.net/weblog2/css/css-coding-for-cross-browser-compatibility/</guid>
		<description><![CDATA[Cross browser compatibility can be hard to achieve, but if you follow a few guidelines, you can make your CSS cross browser compatible a lot easier. Reset your CSS, use supported techniques and don&#8217;t forget to validate.
Reset your CSS
All browsers have default styles applied to certain HTML elements. For example, a h1 element is bold [...]]]></description>
			<content:encoded><![CDATA[<p>Cross browser compatibility can be hard to achieve, but if you follow a few guidelines, you can make your <acronym title="Cascading Style Sheets">CSS</acronym> cross browser compatible a lot easier. Reset your <acronym title="Cascading Style Sheets">CSS</acronym>, use supported techniques and don&#8217;t forget to validate.<span id="more-106"></span></p>
<h3>Reset your <acronym title="Cascading Style Sheets">CSS</acronym></h3>
<p>All browsers have default styles applied to certain <acronym title="HyperText Markup Language">HTML</acronym> elements. For example, a <em>h1</em> element is bold and larger by default, and has some margin too. The problem is that all browsers have different default styles so your <em>h1</em> won&#8217;t look the same in every browser. The font-size isn&#8217;t really</p>
<p>The solution is to <em>reset</em> the default styles of each browser and build it up again with your own styles. Because you&#8217;ve removed the standard browser styles, there won&#8217;t be any difference between the browsers. It&#8217;s like starting on a clean sheet.</p>
<p>There are a lot of <acronym title="Cascading Style Sheets">CSS</acronym> Resets available but <a href="http://meyerweb.com/eric/tools/css/reset/" rel="nofollow" >Eric Meyer&#8217;s <acronym title="Cascading Style Sheets">CSS</acronym> Reset</a> is the most popular, according to a <a href="http://css-tricks.com/poll-results-what-css-reset-do-you-use/" rel="nofollow" >poll on <acronym title="Cascading Style Sheets">CSS</acronym>-Tricks</a>. A round up of the most used <acronym title="Cascading Style Sheets">CSS</acronym> Resets can be found on <a href="http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css-reset-styles/" rel="nofollow" >here</a>.</p>
<p><strong>The disadvantage of a <acronym title="Cascading Style Sheets">CSS</acronym> reset</strong> is that you have to write a lot more code. Every element you reset, has to be build up again. That&#8217;s the reason why a lot of designers use a custom <acronym title="Cascading Style Sheets">CSS</acronym> Reset (13% according to the <acronym title="Cascading Style Sheets">CSS</acronym>-Tricks poll) or <a href="http://snook.ca/archives/html_and_css/no_css_reset/" rel="nofollow" >no <acronym title="Cascading Style Sheets">CSS</acronym> reset at all</a>. Veerle Pieters showed <a href="http://veerle.duoh.com/blog/comments/starting_with_css_and_bug_fixing_tips/#c_18605" rel="nofollow" >her limited <acronym title="Cascading Style Sheets">CSS</acronym> Reset</a> in a reply to a question of <a href="http://veerle.duoh.com/blog/comments/starting_with_css_and_bug_fixing_tips/#c_18598" rel="nofollow" >mine</a>.</p>
<p>A <acronym title="Cascading Style Sheets">CSS</acronym> Reset is important for cross browser compatibility, but you have to decide for yourself how far you must go when resetting your <acronym title="Cascading Style Sheets">CSS</acronym> file.</p>
<h3>Using supported techniques</h3>
<p><acronym title="Cascading Style Sheets">CSS</acronym> offers a lot of techniques, but not all of them are good supported by every browser. For example the <em>:before</em> and <em>:after</em> pseudo selectors, which don&#8217;t work in any version of Internet Explorer, shouldn&#8217;t be used.</p>
<p>Nor should the attribute selectors (like <em>a[href $='.pdf']</em>), for their bad browser support. If you want to use the attribute selectors, use <a href="http://www.webdesignerwall.com/demo/jquery/link-types.html" rel="nofollow" >jQuery</a> instead of <a href="http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html" rel="nofollow" ><acronym title="Cascading Style Sheets">CSS</acronym></a>. jQuery is a good way to imitate <acronym title="Cascading Style Sheets">CSS</acronym> selectors. It can be downloaded <a href="http://docs.jquery.com/Downloading_jQuery" rel="nofollow" >here</a>.</p>
<p>A good overview of <acronym title="Cascading Style Sheets">CSS</acronym> Selectors and their browser support can be found <a href="http://www.westciv.com/style_master/academy/browser_support/selectors.html" rel="nofollow" >here</a>.</p>
<h3>Validate</h3>
<p>I think this one is obvious: Take the time to validate your <acronym title="Cascading Style Sheets">CSS</acronym> styles. Cross browser compatibility is way easier with good and valid <acronym title="Cascading Style Sheets">CSS</acronym>. You can validate your <acronym title="Cascading Style Sheets">CSS</acronym> file using the <a href="http://jigsaw.w3.org/css-validator/" rel="nofollow" >W3 <acronym title="Cascading Style Sheets">CSS</acronym> Validator</a>.</p>
<h3>Summary</h3>
<p>Follow these three guidelines and your <acronym title="Cascading Style Sheets">CSS</acronym> file will have a lot more browser support:</p>
<ul>
<li>Reset your <acronym title="Cascading Style Sheets">CSS</acronym>,</li>
<li>Use only supported techniques and&#8230;</li>
<li>Validate!</li>
</ul>
<p>What are the techniques that you use to assure cross browser compatibility? Please leave a comment and share your thoughts.</p>
<h3>Further Reading</h3>
<ul>
<li><a href="http://www.onyx-design.net/weblog2/other/cross-browser-compatible-in-5-steps/">Make your site cross browser compatible in 5 steps</a></li>
<li><a href="http://www.onyx-design.net/weblog2/featured/css-hacks-inside-css/"><acronym title="Cascading Style Sheets">CSS</acronym> hacks inside <acronym title="Cascading Style Sheets">CSS</acronym></a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.onyx-design.net/featured/css-coding-for-cross-browser-compatibility/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Make your site cross browser compatible in 5 steps</title>
		<link>http://www.onyx-design.net/other/cross-browser-compatible-in-5-steps/</link>
		<comments>http://www.onyx-design.net/other/cross-browser-compatible-in-5-steps/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 17:56:17 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.onyx-design.net/weblog2/other/make-your-site-cross-browser-compatible-in-5-steps/</guid>
		<description><![CDATA[Making your site cross browser compatible is not easy, but with this tutorial you can make your site cross browser compatible in 5 simple steps.

Step 1: Validate
Lots of bugs are caused by invalid (X)HTML or CSS. If you have your site validated, it will be a lot easier to make it cross browser compatible. Validate [...]]]></description>
			<content:encoded><![CDATA[<p>Making your site cross browser compatible is not easy, but with this tutorial you can make your site cross browser compatible in 5 simple steps.</p>
<p><span id="more-84"></span></p>
<h3>Step 1: Validate</h3>
<p>Lots of bugs are caused by invalid (X)<acronym title="HyperText Markup Language">HTML</acronym> or <acronym title="Cascading Style Sheets">CSS</acronym>. If you have your site validated, it will be a lot easier to make it cross browser compatible. Validate your (X)<acronym title="HyperText Markup Language">HTML</acronym> code with the <a href="http://validator.w3.org/" rel="nofollow" ><acronym title="World Wide Web Consortium">W3C</acronym> validator</a> and your <acronym title="Cascading Style Sheets">CSS</acronym> file with the <a href="http://jigsaw.w3.org/css-validator/" rel="nofollow" ><acronym title="World Wide Web Consortium">W3C</acronym> <acronym title="Cascading Style Sheets">CSS</acronym> validator</a>.</p>
<p><img src="http://www.onyx-design.net/weblog2/wp-content/uploads/2008/03/validhtml1.jpg" alt="validhtml" height="150" width="500" /></p>
<h3>Step 2: Check your Website</h3>
<p>Now you have to check your website in all browsers. I always check my site in the browsers, I&#8217;ve installed on my computer (Opera, Safari, Internet Explorer and Firefox). Do it and make a note of the bugs.</p>
<p>Of course, checking your website in the browsers installed on your computer is not enough. You have to check the website in different browser versions on different operating systems. The solution is <a href="http://www.browsershots.org" rel="nofollow" >Browsershots.org</a>. With this website you can take full-length screen shots of your website in a lot of browsers. Just type in your url, bookmark the page and come back 20 minutes later to view the screen shots.</p>
<p><img src="http://www.onyx-design.net/weblog2/wp-content/uploads/2008/03/browsers1.jpg" alt="browsers" height="150" width="500" /></p>
<p>Analyse the screen shots and look for bugs. Be sure to write them down.</p>
<h3>Step 3: Is it worth my time?</h3>
<p>If you notice bugs in very old or uncommon used browsers, ask yourself if it&#8217;s worth your time to fix the problems. Look at the <a href="http://www.w3schools.com/browsers/browsers_stats.asp" rel="nofollow" >browser statistics of w3schools.com</a>, but don&#8217;t forget to look to your own stats (I recommend AWstats). If you have one or two visitors every month still browsing with <acronym title="Internet Explorer 5">IE5</acronym>.5, you should really ask yourself if it&#8217;s necessary to make the changes.</p>
<p><img src="http://www.onyx-design.net/weblog2/wp-content/uploads/2008/03/browserstats.jpg" alt="browserstats" height="150" width="500" /></p>
<h3>Step 4: Search the cause</h3>
<p>Now you know about the bugs, you&#8217;ll have to look for the <acronym title="Cascading Style Sheets">CSS</acronym> attribute or <acronym title="HyperText Markup Language">HTML</acronym> code that is causing this problem. This is often obvious. A good reference can be found on <a href="http://www.westciv.com/style_master/academy/browser_support/index.html" rel="nofollow" >westciv.com</a>. There is a complete list of css attributes with their support in different browsers. Too bad Firefox isn&#8217;t in the tables.</p>
<p>If you still cannot find the cause of the issue, search for topics on webmaster forums or post a topic yourself, with a screen shot and (a part of) your <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="HyperText Markup Language">HTML</acronym> code. A forum I visit often is <a href="http://www.ozzu.com" rel="nofollow" >Ozzu</a>.</p>
<p><img src="http://www.onyx-design.net/weblog2/wp-content/uploads/2008/03/ozzu.jpg" alt="ozzu" height="150" width="500" /></p>
<h3>Step 5: Fix the issues</h3>
<p>Now we&#8217;re at the essential part of making your website cross browser compatible: fixing the issues. If you know the code that is causing the trouble, find a way to <em>rewrite</em> the code for the specific browser. There are loads of <acronym title="Cascading Style Sheets">CSS</acronym> hacks to do that, but I recommend the use of conditional comments. There is an <a href="http://www.456bereastreet.com/archive/200510/stop_using_css_hacks_now/" rel="nofollow" >article on 456 Berea St.</a> explaining why you should use conditional comments instead of <acronym title="Cascading Style Sheets">CSS</acronym> hacks.</p>
<p><strong>Conditional Comments</strong>.<br />
With conditional comments you can link to separate style sheets for all versions of Internet Explorer. A complete reference can be found on <a href="http://www.quirksmode.org/css/condcom.html" rel="nofollow" >quirksmode</a>. For example:<br />
<code>&lt;!--[if <acronym title="Internet Explorer">IE</acronym> 6]&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="ie6style.css" /&gt;<br />
&lt;![endif]--&gt;</code></p>
<p><strong><acronym title="Cascading Style Sheets">CSS</acronym> hacks In-<acronym title="Cascading Style Sheets">CSS</acronym><br />
</strong>If you don&#8217;t want to edit your <acronym title="HyperText Markup Language">HTML</acronym> file with conditional comments, see my article about <a href="http://www.onyx-design.net/weblog2/featured/css-hacks-inside-css/"><acronym title="Cascading Style Sheets">CSS</acronym> hacks inside your <acronym title="Cascading Style Sheets">CSS</acronym> file</a>.</p>
<p><strong>Transparency of Images in <acronym title="Internet Explorer 6">IE6</acronym> and lower<br />
</strong>Internet Explorer 6 and lower will not display your transparent <acronym title="Portable Network Graphics">PNG</acronym>&#8217;s correctly, there is however a simple solution using Java script. It can be found <a href="http://homepage.ntlworld.com/bobosola/" rel="nofollow" >here</a>.</p>
<p>And of course there are loads of other <acronym title="Cascading Style Sheets">CSS</acronym> hacks. There is a <a href="http://centricle.com/ref/css/filters/" rel="nofollow" >complete list</a> on centricle.com, also viewing the browsers that will apply the rules.</p>
<h3>Conclusion</h3>
<p>Making your site cross browser compatible will cost you some time, but it&#8217;s not impossible. The is very good documentation on the web, which can help you in this process. If you use other ways to make your site cross browser compatible, please leave a comment and share it. If you liked this article don&#8217;t forget to digg or float it.</p>]]></content:encoded>
			<wfw:commentRss>http://www.onyx-design.net/other/cross-browser-compatible-in-5-steps/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
