<?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>The English Guy Web Design &#187; opera</title>
	<atom:link href="http://www.theenglishguy.co.uk/tag/opera/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theenglishguy.co.uk</link>
	<description>Web Design, WordPress/Drupal blog design &#38; theming, SEO, css. xhtml, php, coldfusion, jquery and more...</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:47:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cross-Browser CSS Cheatsheet</title>
		<link>http://www.theenglishguy.co.uk/2008/10/17/cross-browser-css-cheatsheet/</link>
		<comments>http://www.theenglishguy.co.uk/2008/10/17/cross-browser-css-cheatsheet/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 12:52:51 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[cheatsheet]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://www.theenglishguy.co.uk/?p=1532</guid>
		<description><![CDATA[I don&#8217;t know how many of these I run across and not all of them are either accurate (up to [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how many of these I run across and not all of them are either accurate (up to date) or complete (some are, but the majority aren&#8217;t). That&#8217;s what persuaded me to write this quick and dirty cheatsheet for those of you who want that little piece of css to get that one browser working.</p>
<p>We&#8217;ll start with a simple truth &#8211; I code for <strong>FireFox</strong> (and <strong>Chrome</strong>) and it seems to have no problems with most code. That being said, there are times where it goes haywire. FF2 and floated elements sometimes have issues.</p>
<p>Anything which says &#8216;CODE&#8217; means your particular css that you want to be cross-browser.</p>
<p><a href="#firefox">FireFox</a>&nbsp;|&nbsp;<a href="#ie6">IE6</a>&nbsp;|&nbsp;<a href="#ie7">IE7</a>&nbsp;|&nbsp;<a href="#opera">Opera</a>&nbsp;|&nbsp;<a href="#safari">Safari</a></p>
<p>
<a name="firefox"></a><br />
<h3>FireFox</h3>
<p>This particular hack targets <strong>FireFox 1</strong> and <strong>FireFox 2</strong>.</p>
<blockquote><p>
body:empty CODE { }
</p></blockquote>
<p>This hacks targets <strong>FireFox 2</strong> and below, particularly nice and foolproof.</p>
<blockquote><p>
CODE, x:-moz-any-link {<br />
&nbsp;&nbsp;property: value;<br />
}
</p></blockquote>
<p>This works well.</p>
<blockquote><p>
html>body CODE { }
</p></blockquote>
<p>This one is a newer hack.</p>
<blockquote><p>
html:not([lang*=""]) CODE { }
</p></blockquote>
<p>This one is to be used with the previous hack that used <em>x:-moz-any-link</em>.</p>
<blockquote><p>
/* This is for the FireFox 2 and 1 */<br />
CODE, x:-moz-any-link {<br />
&nbsp;&nbsp;property: value;<br />
}<br />
/* Then overwrite for Firefox 3 specifically */<br />
CODE, x:-moz-any-link, x:default {<br />
&nbsp;&nbsp;property: value;<br />
}
</p></blockquote>
<p><a name="firefox1"></a>This is the surefire method of targetting <strong>FireFox</strong> though, by using proprietary extensions. Not neat. But, works 100%.</p>
<blockquote><p>
@-moz-document url-prefix() {<br />
&nbsp;&nbsp;CODE { }<br />
}
</p></blockquote>
<p>
<a name="ie6"></a><br />
<h3>IE6</h3>
<p>This particular cross-browser cheat is an old one, but still works. Also targets <strong>IE5</strong> though.</p>
<blockquote><p>
* html CODE { }
</p></blockquote>
<p>This one (I feel) isn&#8217;t as good as the previous one.</p>
<blockquote><p>
body CODE {<br />
&nbsp;&nbsp;_property: value;<br />
}
</p></blockquote>
<p>
<a name="ie7"></a><br />
<h3>IE7</h3>
<p>This is another old favourite for <strong>IE7</strong>.</p>
<blockquote><p>
*+html CODE { }
</p></blockquote>
<p>And here is one that took over from the previous one. This is valid CSS too.</p>
<blockquote><p>
*:first-child+html CODE { }
</p></blockquote>
<p>Since <strong>IE6</strong> doesn&#8217;t understand the &gt; selector, this one works well. Note the * directly in front of the property. I don&#8217;t use this one though since the first one works fine.</p>
<blockquote><p>
html > body CODE {<br />
&nbsp;&nbsp;*property: value;<br />
}
</p></blockquote>
<p>
<a name="opera"></a><br />
<h3>Opera</h3>
<p>This one is a bit more in-depth.</p>
<blockquote><p>
@media all and (min-width:0px) {<br />
&nbsp;&nbsp;head~body CODE { }<br />
}
</p></blockquote>
<p>And this one targets <strong>Opera 9</strong> and below.</p>
<blockquote><p>
html:first-child CODE { }
</p></blockquote>
<p>This one is one of the latest Opera 9 css hacks out:<br />
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) {<br />
&nbsp;&nbsp;head~body CODE { }<br />
}
</p></blockquote>
<p>
<a name="safari"></a><br />
<h3>Safari</h3>
<p>Like the proprietary <strong>FireFox</strong> hacks (<a href="#firefox1">above</a>), <strong>Safari</strong> has one that works 100% with it.</p>
<blockquote><p>
@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
&nbsp;&nbsp;CODE { }<br />
}
</p></blockquote>
<p>This one is for <strong>Safari 3.0+</strong> and is valid css3 so it will eventually be supported by other browsers. This is now invalid (2011).</p>
<blockquote><p>
body:first-of-type CODE {<br />
&nbsp;&nbsp;property:value;<br />
}
</p></blockquote>
<p>For <del><strong>Safari 3.1</strong></del> <strong>Safari 4</strong> this works. Enclose your desired css code in this @media block:</p>
<blockquote><p>
@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
&nbsp;&nbsp;p {<br />
&nbsp;&nbsp;&nbsp;&nbsp;property: value;<br />
&nbsp;&nbsp;}<br />
}
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.theenglishguy.co.uk/2008/10/17/cross-browser-css-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Opera and indexOf</title>
		<link>http://www.theenglishguy.co.uk/2008/01/11/opera-and-indexof/</link>
		<comments>http://www.theenglishguy.co.uk/2008/01/11/opera-and-indexof/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 12:16:04 +0000</pubDate>
		<dc:creator>rich</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[indexof]]></category>
		<category><![CDATA[opera]]></category>

		<guid isPermaLink="false">http://www.theenglishguy.co.uk/2008/01/11/opera-and-indexof/</guid>
		<description><![CDATA[I have been working on some new ordering pages at work for GRS. This includes the engraved labels, engraved plaques [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on some new ordering pages at work for <a href="http://www.grssigns.co.uk/" rel="tag">GRS</a>. This includes the engraved labels, engraved plaques and so on, and today, the <a href="http://www.grssigns.co.uk/mailorder/labels.php" rel="tag">safety sign stickers</a>.</p>
<p>I had a great idea yesterday of linking articles from the company blog to individual stickers, so one article for <a href="http://www.grssigns.co.uk/mailorder/labels.php?type=w&#038;style=Electrical">Electrical Warning</a> stickers, one article for <a href="http://www.grssigns.co.uk/mailorder/labels.php?type=p&#038;style=Noswimming" rel="tag">No Swimming</a> and so on. Great idea isn&#8217;t it? Google should pick up on it and it will generate traffic for the company&#8217;s website.</p>
<p>Then I ran into a problem. Because of the way I was handling the sign symbols, I was using an array and happened to use indexOf to find where a word was in the array. Opera and IE(7) were going nowhere with it &#8211; FireFox was fine (surprise). Then I found an article at CommaDot, entitled <a href="http://commadot.com/opera-js-troubleshooting/" rel="tag">Opera JS Troubleshooting</a> which resolved the issue, apparently a bug with the way Opera handles indexOf (and incidentally, it fixed IE7&#8242;s issue with it too). Here it is:</p>
<blockquote><p>
// This is solely to support indexOf in Opera.  Not sure of a better way to do this<br />
if (!Array.prototype.indexOf) {<br />
&nbsp;&nbsp;Array.prototype.indexOf = function(val, fromIndex) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if (typeof(fromIndex) != â€˜numberâ€™) fromIndex = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;for (var index = fromIndex,len = this.length; index < len; index++)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this[index] == val) return index;<br />
&nbsp;&nbsp;&nbsp;&nbsp;return -1;<br />
&nbsp;&nbsp;}<br />
}
</p></blockquote>
<p>Now it all works properly, as it should, setting the document&#8217;s title and the h1 title on the page to the correct symbol name.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.theenglishguy.co.uk/2008/01/11/opera-and-indexof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

