<?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>Komodo Media &#187; png</title>
	<atom:link href="http://www.komodomedia.com/tags/png/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.komodomedia.com</link>
	<description>blog, webdesign, illustration &#38; newsk00l javascript</description>
	<lastBuildDate>Wed, 18 Jan 2012 14:43:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sexy Music Album Overlays</title>
		<link>http://www.komodomedia.com/blog/2009/03/sexy-music-album-overlays/</link>
		<comments>http://www.komodomedia.com/blog/2009/03/sexy-music-album-overlays/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 21:18:25 +0000</pubDate>
		<dc:creator>Rogie</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Nerdlab]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[album]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://www.komodomedia.com/?p=1157</guid>
		<description><![CDATA[<img src="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/album_banner.jpg" alt="Sexy Album Overlays" />
It's the social web now. We share everything, from our musical tastes, to the<a href="http://twitter.com/rogieking/statuses/1245686411"> bacon avocado burger we ate for breakfast </a>, to the <a href="http://twitter.com/rogieking/statuses/1284215360">very funny things we say and do.</a>

I want to show you how to style your music streams and give you some graphics to do so, cause let's face it, it takes time to design things and it's easier to use mine than yours ;)]]></description>
			<content:encoded><![CDATA[<p><img src="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/album_banner.jpg" alt="Sexy Album Overlays" /></p>
<div class="post_info">
<ul>
<li>
<h4>Resources</h4>
</li>
<li><a href="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/sample.zip" class="download">Download Sample File</a></li>
<li><a href="http://www.komodomedia.com/download/#sexy-music-album-overlays" class="download">Download PNG overlays</a></li>
<li><a href="http://d2dnrmagaqciul.cloudfront.net/projects/music_covers/index.html" class="preview">Preview</a></li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&#038;business=rogie%40komodomedia%2ecom&#038;item_name=Show some love&#038;no_shipping=0&#038;no_note=1&#038;tax=0&#038;currency_code=USD&#038;lc=US&#038;bn=PP%2dDonationsBF&#038;charset=UTF%2d8">Show Mass Love</a></li>
</ul>
</div>
<p>It&#8217;s the social web now. We share everything, from our musical tastes, to the<a href="http://twitter.com/rogieking/statuses/1245686411"> bacon avocado burger we ate for breakfast </a>, to the <a href="http://twitter.com/rogieking/statuses/1284215360">very funny things we say and do.</a> With amazing <abbr title="Application Programming Interface">APIs</abbr> such as the ones offered by <a href="http://last.fm">Last.fm</a>, <a href="http://twitter.com">Twitter</a>, <a href="http://flickr.com">Flickr</a> and more, we can now put them all on our sites, showing close to real-time updates of the music we are listening to, conversations we are having, and the things we are seeing.  </p>
<p>With this slew of api stew hitting the fan, its no wonder websites and blogs are looking cramped, busy, and ugly. Why not pretty them up a bit? That&#8217;s what I intend to do. I want to show you how to style your music streams and give you some graphics to do so, cause let&#8217;s face it, it takes time to design things and it&#8217;s easier to use mine than yours ;) Alright, enough banter, let&#8217;s get to the goodies.</p>
<h3>The XHTML</h3>
<p>Keeping it simple and semantic, we describe our &#8220;list&#8221; of music with an unordered list. We link the title and supply a thumbnail image to bring some life to the album. In the real world, fill your alt attributes and titles with some helpful information for those using screen readers. Simple enough eh?<br />
<code>&lt;ul class="music"&gt;<br />
	&lt;li&gt;<br />
		&lt;a href="..."&gt;Hungry Like the Wolf: Duran Duran&lt;/a&gt;<br />
		&lt;img src="albums/duran.jpg" alt="..." /&gt;<br />
	&lt;/li&gt;<br />
&lt;/ul&gt;</code></p>
<h3>The PNG Overlays</h3>
<p>Next, if we are talking sexy, we need sexy <abbr title="Portable Network Graphic">PNG</abbr> images designed to lay over the images. This way, our list doesn&#8217;t look like the same old boring square 50px x 50px image (like everybody else and their llama&#8217;s neighbor has). This is the part where you get lucky and get some freebies thrown your way. Here are three <abbr title="Portable Network Graphic">PNG</abbr> images that I&#8217;ve designed (perhaps inspired by some music apps around the intarweb) that are free for you to do whatever you&#8217;d like with. Yes, even that.</p>
<h4>Jewel Case</h4>
<p><img src="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/jewel.png" alt="Jewel Case" /> </p>
<h4>Vinyl Record Sleeve</h4>
<p><img src="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/vinyl.png" alt="Vinyl Record Sleeve" /></p>
<h4>Compact Disc</h4>
<p><img src="http://d2dnrmagaqciul.cloudfront.net/wp-content/uploads/2009/03/cd.png" alt="Compact Disc" /> </p>
<h3>The <abbr title="Cascading Style Sheet">CSS</abbr></h3>
<p>Now that we have some sweet looking markup, and the <abbr title="Portable Network Graphic">PNG</abbr> overlays ain&#8217;t that bad either, let&#8217;s get to rocking the stylesheet to make this all come together in a beautiful matrimony&#8230;or something like that.</p>
<p>Okay, the first thing I am going to do in lieu of a <a href="http://meyerweb.com/eric/thoughts/2008/01/15/resetting-again/">reset stylesheet</a> is just reset what I am working with like so:</p>
<p><code>ul.music,<br />
ul.music li,<br />
ul.music li a,<br />
ul.music li img{<br />
	margin:0;<br />
	padding:0;<br />
	list-style:none;<br />
	border:0;<br />
	text-decoration:none;<br />
}</code></p>
<p>Next, I want a little bit of margin (or spacing) between my list of albums. This is totally up to you, but I decided to go with 15 pixels. Also, I want the albums to show up in a row and then line wrap when they reach the edge of the containing element. To do this, I float the list items left:</p>
<p><code>ul.music li{<br />
	margin:15px 15px 15px 0;<br />
	float:left;<br />
	position:relative;<br />
}</code></p>
<p>Okay, the next rule will style the link to the album and it gets a little more hairy. I&#8217;ll explain the premise of the style and you can fill in the gaps of how it works. The idea is that we can use the link as the album overlay if we set the PNG image as the background (for this example, we are using the vinyl overlay). As long as we put the link over the image (z-index and relative positioning) and set the dimensions (block display, width and height) of the link to that of the PNG overlay, it should work. </p>
<p>Also, I decided for my implementation, that I didn&#8217;t want the text of the album to show, hence the negative <code class="inline">text-indent</code> rule and <code class="inline">overflow:hidden;</code> to keep that negative text indent from showing. You can keep the album text with a few additional styles.</p>
<p><code>ul.music li a{<br />
	display:block;<br />
	position:relative;<br />
	background:url(vinyl.png) 0 0 no-repeat;<br />
	float:left;<br />
	width:90px;<br />
	height:82px;<br />
	text-indent:-1000em;<br />
	overflow:hidden;<br />
	z-index:1;<br />
}</code></p>
<p>If you&#8217;ve done your math, we&#8217;ve only got one more tag to style: the <code class="inline">img</code> tag. The idea with styling this is very simple. Just set the dimensions of the image to that of the viewport of the PNG overlay and position the top-left coordinate so that the image lines up perfectly in the viewport. We use absolute positioning so that this image doesn&#8217;t affect the size or layout of it&#8217;s parent list item and position it right in the viewport of the vinyl png image, in this case at the 2px, 1px coordinate:</p>
<p><code>ul.music li img{<br />
	position:absolute;<br />
	width:72px;<br />
	height:72px;<br />
	left:2px;<br />
	top:1px;<br />
}</code></p>
<h3>Wait, what if there isn&#8217;t album art?</h3>
<p>That&#8217;s right. You are special. You listen to underground music. This music is so underground and obscure, that not even the most savvy of databases can capture your unique taste, leaving you with a bunch of empty albums and no art. Well, you rogue you, I&#8217;ve got some CSS to fix that. We still have one more tag we can use as a background and that is the <code class="inline">li</code>. I&#8217;ve whipped up some empty album art as well and we&#8217;ll use it for the blank state. All we need to do now is position the blank album insert in the &#8220;viewport&#8221; of the PNG overlay like so. Voila!</p>
<p><code>ul.music li{<br />
	background:url(blank_insert.gif) 2px 1px no-repeat;<br />
}</code></p>
<h3>That&#8217;s it!</h3>
<p>Yeah right. There&#8217;s always the dreaded two-headed beast Internet Explorer. Let&#8217;s have a little chat about how Internet Explorer jacks things up for us web designers. First of all, <abbr title="Internet Explorer 7">IE7</abbr> really doesn&#8217;t give us that much grief. It&#8217;s biggest flaw is that it sucks big time at rendering images at any size other  than its inherent size. What does this mean? Well, if an image has dimensions of 100px by 100px and you set the size (as we did) to 72px by 72px, <abbr title="Internet Explorer 7">IE7</abbr> basically takes a dump on itself and renders it with jaggies and all gross. Luckily we can fix it&#8217;s issues with the following CSS rule:</p>
<p><code>img {<br />
	-ms-interpolation-mode:bicubic;<br />
}</code></p>
<p>Wow. That was way too easy for an Internet Explorer issue. Ahhh, don&#8217;t worry, more pain will come.  Next, as we all know, Internet Explorer 6 sucks at displaying PNG images with alpha transparency. Wow. Big surprise. Luckily, there is another Microsoft-specific CSS rule that we can use to overcome this impairment. Here is the code that makes <abbr title="Internet Explorer 6">IE6</abbr> behave like a red-headed stepchild should:</p>
<p><code>ul.music li.vinyl a{<br />
	background:none;<br />
	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='vinyl.png', sizingMethod='crop');<br />
}</code></p>
<h3>That&#8217;s it for realz?</h3>
<p>Yes, that&#8217;s it for reals! Now you can make your Last.fm music playlists all sexy. Two words of advice. One, if you want to be mega nice, link my site as a thank you, but you don&#8217;t have to. Two, get out and make the web beautiful! Here are some resources to get you on your way:</p>
<ul>
<li><a href="http://www.komodomedia.com/download/#sexy-music-album-overlays" class="download">Download the PNG overlays in this article</a></li>
<li><a href="http://www.komodomedia.comwp-content/uploads/2009/03/sample.zip" class="download">Download a Sample File</a></li>
<li><a href="http://d2dnrmagaqciul.cloudfront.net/projects/music_covers/" class="preview">View the complete CSS and XHTML for this article</a></li>
<li><a href="http://www.command-tab.com/2008/09/06/fmtuner-a-lastfm-plugin-for-wordpress/">Last.fm Plugin for WordPress</a></li>
<li><a href="http://www.last.fm/download">Last.fm apps</a>, <a href="http://www.sophiestication.com/coversutra/">CoverSutra</a> &amp; <a href="http://bowtieapp.com">BowTie</a>: iTunes controllers/Last.fm <a href="http://www.netlingo.com/word/scrobble.php">scrobblers</a></a>
</ul>
<h3>Update</h3>
<p>So far, I haven&#8217;t seen many sites using these overlays, but here are a few. I&#8217;d love to see how people are using it and where, so <a href="/contact">drop a line and let me know</a>. Here are a few sites that are using these album overlays:</p>
<ul>
<li><strong>James Lao</strong> &#8211; <a href="http://jameslao.com/">http://jameslao.com</a></li>
<li><strong>Maniacal Rage</strong> &#8211; <a href="http://log.maniacalrage.net/post/130206922/april-may-and-june-music-purchases">http://log.maniacalrage.net/</a></li>
<li><strong>Hello! Ranking</strong> &#8211; <a href="http://www.thello-ranking.com/">http://www.hello-ranking.com</a></li>
<li><strong>In Hearts Wake</strong> &#8211; <a href="http://inheartswake.com/">http://inheartswake.com/</a></li>
<li><strong>Phunky</strong> &#8211; <a href="http://phunky.co.uk/">http://phunky.co.uk/</a></li>
<li><strong>Chris Wallace</strong> &#8211; <a href="http://chris-wallace.com">http://www.chris-wallace.com/</a></li>
<li><strong>Jack and Diana</strong> &#8211; <a href="http://jakeanddiana.com/">http://jakeanddiana.com/</a></li>
<li><strong>Gilbert Pellegrom</strong> &#8211; <a href="http://www.gilbertpellegrom.co.uk/">http://www.gilbertpellegrom.co.uk/</a></li>
<li><strong>The Things I Do</strong> &#8211; <a href="http://www.thethingsido.net/">http://www.thethingsido.net</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.komodomedia.com/blog/2009/03/sexy-music-album-overlays/feed/</wfw:commentRss>
		<slash:comments>93</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: komodomedia.com @ 2012-02-10 13:21:16 by W3 Total Cache -->
