<?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>bunnyhero dev &#187; CSS</title>
	<atom:link href="http://www.bunnyhero.org/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bunnyhero.org</link>
	<description>Notes on iPhone, Flash and Web development</description>
	<lastBuildDate>Fri, 23 Jul 2010 18:00:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>iPhone VR: Viewing 3D panoramas in Safari using JavaScript and -webkit-transform</title>
		<link>http://www.bunnyhero.org/2008/10/13/iphone-vr-viewing-3d-panoramas-in-safari-using-javascript-and-webkit-transform/</link>
		<comments>http://www.bunnyhero.org/2008/10/13/iphone-vr-viewing-3d-panoramas-in-safari-using-javascript-and-webkit-transform/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 03:59:48 +0000</pubDate>
		<dc:creator>bunnyhero</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://www.bunnyhero.org/?p=81</guid>
		<description><![CDATA[Apple&#8217;s 2.0 iPhone update brought some interesting enhancements to Mobile Safari, including 3-D perspective and access to multitouch events. Armed with the documentation (of varying quality) from Apple&#8217;s Web Apps Dev Centre, and invaluable information from blog articles such as Idean&#8217;s &#8220;Spin the Bottle&#8221;, SitePen&#8217;s &#8220;Touching and Gesturing on the iPhone&#8221; and Paul Bakaus&#8217;s &#8220;3D CSS Transforms on the iPhone&#8221;, I put together a simple web app that displays a cubic panorama in Mobile Safari. Look left, right, up and down by dragging your finger across the display. No zoom, currently, though. It was pretty straightforward, but I did learn a few things while creating it. Go ahead, take a look :D Visit http://tinyurl.com/iphonevr on your iPhone or iPod Touch. The images used for the panorama are taken from one of the QuickTime VR movies in Apple&#8217;s Cubic VR gallery. I extracted the images from the movie using the procedure explained here (in French, but it&#8217;s easy to follow). I may write a full tutorial on this eventually, but for now I will just share a few notes (and the source code): It&#8217;s a lot easier to get the 3-d transforms right if the elements you want to transform start [...]]]></description>
			<content:encoded><![CDATA[<p>Apple&#8217;s 2.0 iPhone update brought some interesting enhancements to Mobile Safari, including 3-D perspective and access to multitouch events. Armed with the documentation (of varying quality) from <a href="http://developer.apple.com/webapps/">Apple&#8217;s Web Apps Dev Centre</a>, and invaluable information from blog articles such as <a href="http://www.idean.com/blog/spin-the-bottle/">Idean&#8217;s &#8220;Spin the Bottle&#8221;</a>, <a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/">SitePen&#8217;s &#8220;Touching and Gesturing on the iPhone&#8221;</a> and <a href="http://paulbakaus.com/?p=15&#038;language=en">Paul Bakaus&#8217;s &#8220;3D CSS Transforms on the iPhone&#8221;</a>, I put together a <a href="http://tinyurl.com/iphonevr">simple web app</a> that displays a <a href="http://www.panoguide.com/howto/panoramas/types.jsp">cubic panorama</a> in Mobile Safari. Look left, right, up and down by dragging your finger across the display. No zoom, currently, though. It was pretty straightforward, but I did learn a few things while creating it.</p>
<p>Go ahead, take a look :D Visit <a href="http://tinyurl.com/iphonevr">http://tinyurl.com/iphonevr</a> on your iPhone or iPod Touch.</p>
<p><img src="http://www.bunnyhero.org/wp-content/uploads/2008/10/photo-1-200x300.jpg" alt="" title="iphone vr 1" width="200" height="300" class="alignnone size-medium wp-image-84" /> <img src="http://www.bunnyhero.org/wp-content/uploads/2008/10/photo-200x300.jpg" alt="" title="iphone vr 2" width="200" height="300" class="alignnone size-medium wp-image-86" /></p>
<p>The images used for the panorama are taken from one of the QuickTime VR movies in <a href="http://www.apple.com/quicktime/gallery/cubicvr/">Apple&#8217;s Cubic VR gallery</a>.  I extracted the images from the movie using <a href="http://www.qtbridge.com/LS/Tips/GetImagesFromVR/index.html">the procedure explained here</a> (in French, but it&#8217;s easy to follow).</p>
<p>I may write a full tutorial on this eventually, but for now I will just share a few notes (and the <a href="http://www.bunnyhero.org/static/iphonevr/iphone-vr.zip">source code</a>):</p>
<ul>
<li>It&#8217;s a lot easier to get the 3-d transforms right if the elements you want to transform start out centred in their containing block (so that they start at (0, 0, 0), essentially). I did this with regular CSS, but I suppose this could also be done as part of the transform.
</li>
<li>The above also applies (especially) to any DIV that contains nothing but other DIVs. At first my cube was spinning around its top edge, instead of its centre, because its children (the cube faces) were absolute-positioned, and thus the &#8220;cube&#8221; DIV itself had no height! Giving it an explicit width and height solved this.
</li>
<li>Touch events on 3-D transformed elements seemed to be little bit unreliable. I worked around this by putting a normal transparent DIV on top of the whole thing and listened to events on that instead.
</li>
</ul>
<p><a href="http://www.bunnyhero.org/static/iphonevr/iphone-vr.zip">Download the source code</a> (MIT Licence).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bunnyhero.org/2008/10/13/iphone-vr-viewing-3d-panoramas-in-safari-using-javascript-and-webkit-transform/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MySpace layouts are a pain</title>
		<link>http://www.bunnyhero.org/2007/03/02/myspace-layouts-are-a-pain/</link>
		<comments>http://www.bunnyhero.org/2007/03/02/myspace-layouts-are-a-pain/#comments</comments>
		<pubDate>Fri, 02 Mar 2007 19:37:01 +0000</pubDate>
		<dc:creator>bunnyhero</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[MySpace]]></category>

		<guid isPermaLink="false">http://www.bunnyhero.org/2007/03/02/myspace-layouts-are-a-pain/</guid>
		<description><![CDATA[It seems that my new div-based pet codes are sometimes not showing up on some people&#8217;s layouts. Why not? Due to MySpace&#8217;s generally crappy HTML, any CSS layouts have to use stupid selectors like table table table td.text table table div { whatever }. Insanity! See this great post for more insight on MySpace layout nuttiness. Anyway, it appears that some MySpace layouts are targetting something inside some div that happens to also match my pet code, which itself lives inside a div. These selectors tend to aim to hide whatever it is they&#8217;re targetting with display: none or visibility: hidden. This means that my pets turn invisible too! Argh. I&#8217;m not sure what to do about this exactly, except maybe go back to table-based code, or pepper inline style attributes everywhere. Or put everything inside a form, just to be perverse :P]]></description>
			<content:encoded><![CDATA[<p>It seems that my new div-based pet codes are sometimes not showing up on some people&#8217;s layouts. Why not?</p>
<p>Due to MySpace&#8217;s generally crappy HTML, any CSS layouts have to use stupid selectors like <code>table table table td.text table table div { whatever }</code>. Insanity! See <a href="http://www.mikeindustries.com/blog/archive/2006/04/hacking-myspace-layouts">this great post for more insight on MySpace layout nuttiness</a>.</p>
<p>Anyway, it appears that some MySpace layouts are targetting <em>something</em> inside some <code>div</code> that happens to also match my pet code, which itself lives inside a <code>div</code>. These selectors tend to aim to hide whatever it is they&#8217;re targetting with <code>display: none</code> or <code>visibility: hidden</code>. This means that <strong>my pets turn invisible too</strong>! Argh.</p>
<p>I&#8217;m not sure what to do about this exactly, except maybe go back to table-based code, or pepper inline <code>style</code> attributes everywhere. Or put everything inside a <code>form</code>, just to be perverse :P</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bunnyhero.org/2007/03/02/myspace-layouts-are-a-pain/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
