<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Dan Rubin</title>
    <link>http://virb.com/danrubin</link>
    <description><![CDATA[]]></description>
    <generator>Virb 2.0 (@danrubin)</generator>
    <language>en</language>
    <item>
      <title>The Stadium</title>
      <link>http://virb.com/danrubin/videos/1744130</link>
      <description><![CDATA[]]></description>
      <pubDate>Sun, 14 Oct 2007 17:35:52 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1744130</guid>
    </item>
    <item>
      <title>We... Are... Irish!</title>
      <link>http://virb.com/danrubin/videos/1744129</link>
      <description><![CDATA[]]></description>
      <pubDate>Sun, 14 Oct 2007 17:33:16 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1744129</guid>
    </item>
    <item>
      <title>Kick-off!</title>
      <link>http://virb.com/danrubin/videos/1744128</link>
      <description><![CDATA[]]></description>
      <pubDate>Sun, 14 Oct 2007 17:31:27 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1744128</guid>
    </item>
    <item>
      <title>The teams take the field</title>
      <link>http://virb.com/danrubin/videos/1744127</link>
      <description><![CDATA[]]></description>
      <pubDate>Sun, 14 Oct 2007 17:28:49 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1744127</guid>
    </item>
    <item>
      <title>Notre Dame Alma Mater</title>
      <link>http://virb.com/danrubin/videos/1744126</link>
      <description><![CDATA[]]></description>
      <pubDate>Sun, 14 Oct 2007 17:16:42 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1744126</guid>
    </item>
    <item>
      <title>In Transit: M60 Bus from LGA to Manhattan</title>
      <link>http://virb.com/danrubin/videos/1731633</link>
      <description><![CDATA[<p>I&#039;ve taken the subway into Manhattan before, so I thought I&#039;d try the bus (as it is, bus or taxi are the only ways in from La Guardia). This gives you an idea of exactly how rough the ride was.</p>]]></description>
      <pubDate>Tue, 10 Apr 2007 02:40:37 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1731633</guid>
    </item>
    <item>
      <title>In Transit: M60 Bus from LGA to Manhattan</title>
      <link>http://virb.com/danrubin/videos/1731632</link>
      <description><![CDATA[<p>I&#039;ve taken the subway into Manhattan before, so I thought I&#039;d try the bus (as it is, bus or taxi are the only ways in from La Guardia). This gives you an idea of exactly how rough the ride was.</p>]]></description>
      <pubDate>Tue, 10 Apr 2007 02:39:19 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1731632</guid>
    </item>
    <item>
      <title>In Transit: M60 Bus from LGA to Manhattan</title>
      <link>http://virb.com/danrubin/videos/1731631</link>
      <description><![CDATA[<p>I&#039;ve taken the subway into Manhattan before, so I thought I&#039;d try the bus (as it is, bus or taxi are the only ways in from La Guardia). This gives you an idea of exactly how rough the ride was.</p>]]></description>
      <pubDate>Tue, 10 Apr 2007 02:37:58 -0700</pubDate>
      <guid>http://virb.com/danrubin/videos/1731631</guid>
    </item>
    <item>
      <title>Self Portrait</title>
      <link>http://virb.com/danrubin/photos/1225056</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1225056"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-367811-danselfportrait042007nyc.jpg" /></a><p>Long hair while in NYC, right before I had it cut.</p>]]></description>
      <pubDate>Sat, 21 Apr 2007 14:38:18 -0700</pubDate>
      <guid>http://virb.com/danrubin/photos/1225056</guid>
    </item>
    <item>
      <title>Self Portrait</title>
      <link>http://virb.com/danrubin/photos/1225055</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1225055"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-367810-danselfportrait042007.jpg" /></a><p>2nd day with short hair again.</p>]]></description>
      <pubDate>Sat, 21 Apr 2007 14:38:06 -0700</pubDate>
      <guid>http://virb.com/danrubin/photos/1225055</guid>
    </item>
    <item>
      <title>Ebbets Field</title>
      <link>http://virb.com/danrubin/photos/1192537</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1192537"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-286778-EbbetsFieldSpiritoftheGulf.jpg" /></a><p>My brother Alex&#039;s collegiate quartet formed last year; their original tenor went to NYC for more schooling, so I&#039;m now the permanent substitute. Members, l to r: me, Paul Saca (lead), Amos Velez (bass), Alex Rubin (bari).</p>]]></description>
      <pubDate>Thu, 05 Apr 2007 01:39:03 -0700</pubDate>
      <guid>http://virb.com/danrubin/photos/1192537</guid>
    </item>
    <item>
      <title>a headshot for all my writing</title>
      <link>http://virb.com/danrubin/photos/1187522</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1187522"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-274297-dsr_headshot_a.jpg" /></a>]]></description>
      <pubDate>Mon, 02 Apr 2007 18:59:31 -0700</pubDate>
      <guid>http://virb.com/danrubin/photos/1187522</guid>
    </item>
    <item>
      <title>Stephanie-and-Dan</title>
      <link>http://virb.com/danrubin/photos/1093320</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1093320"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-30520-StephanieandDan.jpg" /></a>]]></description>
      <pubDate>Wed, 17 Jan 2007 02:16:42 -0800</pubDate>
      <guid>http://virb.com/danrubin/photos/1093320</guid>
    </item>
    <item>
      <title>snow</title>
      <link>http://virb.com/danrubin/photos/1093319</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1093319"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-30519-myspace_snow.jpg" /></a>]]></description>
      <pubDate>Wed, 17 Jan 2007 02:14:53 -0800</pubDate>
      <guid>http://virb.com/danrubin/photos/1093319</guid>
    </item>
    <item>
      <title>Fall-Convention-2006-Stephanie-Dan2</title>
      <link>http://virb.com/danrubin/photos/1093318</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1093318"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-30518-FallConvention2006StephanieDan2.jpg" /></a>]]></description>
      <pubDate>Wed, 17 Jan 2007 02:13:00 -0800</pubDate>
      <guid>http://virb.com/danrubin/photos/1093318</guid>
    </item>
    <item>
      <title>crazy hair</title>
      <link>http://virb.com/danrubin/photos/1092891</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1092891"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-29336-dan_in_lynn_2007.jpg" /></a>]]></description>
      <pubDate>Thu, 11 Jan 2007 21:50:02 -0800</pubDate>
      <guid>http://virb.com/danrubin/photos/1092891</guid>
    </item>
    <item>
      <title>Wildman Dan</title>
      <link>http://virb.com/danrubin/photos/1092890</link>
      <description><![CDATA[<a href="http://virb.com/danrubin/photos/1092890"><img src="http://g.virbcdn.com/i/resize_575x575/Image-2876-29335-dan_nashville_wildman.jpg" /></a><p>This was taken during one of my recent trips to Nashville, by my recording engineer... can&#039;t remember what the hell I was doing, but obviously rocking out :)</p>]]></description>
      <pubDate>Thu, 11 Jan 2007 21:47:21 -0800</pubDate>
      <guid>http://virb.com/danrubin/photos/1092890</guid>
    </item>
    <item>
      <title>The Final Word on IE6</title>
      <link>http://virb.com/danrubin/posts/text/806424</link>
      <description><![CDATA[<p>A <a href="http://chrisfullman.com/">friend of mine</a> recently asked the question <a href="http://chrisfullman.com/2008/09/why-the-hate-on-internet-explorer-6/">"Why the Hate on Internet Explorer 6?"</a> He explains some very logical reasons why it doesn't make sense to be so negative about <span class="caps">IE6</span>, and as I agree with him on just about all points, I thought I'd give the clearest answer I&nbsp;could.</p>
<p>Simply put, <span class="caps">IE6</span> shouldn't get any hate. Nor should it receive any love,&nbsp;either.</p>
<p>The best thing the <a href="http://www.webstandards.org/">web standards community</a> (and any other smart web folk) can do is stop complaining about an ancient browser whose <a href="http://www.microsoft.com/">developer</a> waited too long to replace, and just stop supporting it&nbsp;altogether.</p>
<p>One of the benefits of web standards is that our documents are marked up correctly before we reach the presentational stage. One of the benefits of <span class="caps">IE6</span> (et al) is that we can target specific versions using <a href="http://www.quirksmode.org/css/condcom.html">Conditional Comments</a>. The combination of the two means we can still send our <em>content</em> to old browsers, but not have to bother with the <em>presentation</em>, thus saving ourselves hours of needless headaches and frustrations, while not punishing the users of said old browsers by denying them access to our&nbsp;content.</p>
<p>There's constant discussion about whether or not to continue support for <span class="caps">IE6</span>, and the only reason ever given these days in favor of supporting that browser is its market share. That market share is diminishing, and we've already reached the <a href="http://www.microsoft.com/windows/internet-explorer/beta/">second beta of <span class="caps">IE8</span></a>, so let's start dropping it already. Make the argument against supporting <span class="caps">IE6</span>, to your clients, your boss, your team--whoever needs to hear it, keep applying pressure and don't back&nbsp;down.</p>
<p><strong>It's time to stop supporting <span class="caps">IE6</span>.&nbsp;Period.</strong></p>
]]></description>
      <pubDate>Thu, 04 Sep 2008 03:49:21 -0700</pubDate>
      <guid>http://virb.com/danrubin/posts/text/806424</guid>
    </item>
    <item>
      <title>Regex Patterns for Single Line CSS</title>
      <link>http://virb.com/danrubin/posts/text/798182</link>
      <description><![CDATA[<p class="alert"><strong>Update:</strong> You can now download the Textmate macro file rather than recording your own (<a href="#download">skip to the download&nbsp;&raquo;</a>).</p>
<p>There has been <a href="http://orderedlist.com/articles/single-line-css">plenty</a> of <a href="http://www.flickr.com/photos/jonathansnook/2800852816/">discussion</a> about the pros and cons of single-line style sheets, and I've been including them as an option when teaching <span class="caps">CSS</span> management and organization in my <a href="http://webdesignworld.com/">Web Design World</a> <a href="http://superfluousbanter.org/presentations/2008/">presentations</a> in Chicago, Seattle, and later this year in Las Vegas (at <a href="http://webbuilderconference.com/2008/">WebBuilder</a>) and&nbsp;Boston.</p>
<h3>It's a matter of&nbsp;preference</h3>
<p>As a fellow <a href="http://sidebarcreative.com/">Sidebar</a>-ian (<em>Sidebarbarian?</em>) <a href="http://orderedlist.com">Steve</a> has been trying to convince me to use the single-line approach for a while of course, and <a href="http://avalonstar.com">Bryan</a> and <a href="http://snook.ca/jonathan">Jon</a> have also become fans of this formatting style for their own work. Although they are enamored with it, I haven't taken to it yet, still preferring to write my style sheets using the "normal" indented formatting most of us are used&nbsp;to.</p>
<p><img src="http://farm4.static.flickr.com/3083/2858224571_a4a5c2171b_o.png" alt="alt" title="Multi-line CSS vs Single-line CSS in Textmate" width="500" height="200" /></p>
<p>Now, before anyone gets their knickers in a twist about why they love, hate, "can't live without" or "will die before they try" single-line formatting, let's just take a step back and remember one thing: it isn't anything special, just an alternate formatting style that doesn't affect the way the browser interprets the style sheet one iota. It's a personal preference--remember that before jumping on or off this particular&nbsp;bandwagon.</p>
<h3>Always keep your options&nbsp;open</h3>
<p>Now that I've got that out of my system, let's talk practicality: there are indeed benefits to be had when using single-line <span class="caps">CSS</span> formatting--for example, I find it can make a difference <em>after</em> a project has been completed, at which point I'm usually more interested in visually scanning a style sheet for the selectors first, and then for a particular property I'm interested in editing. This is where I've found single-line formatting can come in&nbsp;handy.</p>
<h3>But my editor already does&nbsp;that!</h3>
<p>This is the point where some people will start going on about how you could just use <a href="http://macromates.com/">Textmate's</a> "foldings" feature to get the same visual result (without altering your file), or how <a href="http://macrabbit.com/cssedit/"><span class="caps">CSS</span> Edit</a> has a handy list of all the selectors in a column on the left side of its window, or that you could always use your editor's "find" command and search for the selector you want to edit. Yet while those are all perfectly logical, sane suggestions, they don't account for flexibility and&nbsp;choice.</p>
<h3>Just another way of doing&nbsp;things</h3>
<p>Much like <a href="http://hicksdesign.co.uk">Jon Hicks</a> with <a href="http://www.hicksdesign.co.uk/journal/browser-polygamy-movement">his harem of web browsers</a>, I tend to be a bit of a "text editor polygamist", bouncing from Textmate to <span class="caps">CSS</span> Edit to <a href="http://panic.com/coda">Coda</a> to <a href="http://www.barebones.com/products/bbedit/">BBEdit</a> to <a href="http://panic.com/transmit">Transmit's</a> text editor and a host of <span class="caps">CLI</span> editors, mostly depending on my mood (though sometimes contextual if I'm at a computer that doesn't have a particular application--a WindowsXP box with nothing but Notepad, for instance). It's the times when I'm using an editor that doesn't have "foldings" or pretty columns of selectors that I start to appreciate single-line <span class="caps">CSS</span> when making quick edits, so I've started converting style sheets to a "simple" single-line format (without the left-aligned tab blocks to start each rule's properties) once they are ready to go&nbsp;live.</p>
<h3>Patterns fit for a&nbsp;kilt</h3>
<p>Editors like Textmate and BBEdit have built-in commands for formatting (the standard, multi-line approach) or compressing (the entire style sheet on one line, ostensibly to reduce file size by stripping white space) <span class="caps">CSS</span>, but no way to convert to single-line formatting and Textmate's "Format <span class="caps">CSS</span> Compressed" bundle can format your stylesheet to a single line per-rule, though it's all squished together, making it difficult to scan due to a lack of whitespace. Converting a style sheet by hand every time would be much too time-consuming to bother with, but that's where regular expressions come to the&nbsp;rescue.</p>
<p>In Textmate, you can record a macro using each of these regex patterns as a separate step (I'm sure other editors have a similar feature, so please feel free to post details in the comments below). This allowed me to create a "Format <span class="caps">CSS</span> Single-line" command, complete with a keyboard shortcut, which enables an easy switch between multi- and single-line&nbsp;formatting.</p>
<p><img src="http://farm4.static.flickr.com/3018/2807882379_3c8d360872_o.png" alt="alt" title="Single-line CSS macro in Textmate" width="500" height="200" /></p>
<p>Unfortunately, as of this writing Textmate macros cannot be exported and shared For those using Textmate, getting the macro is a simple matter of downloading, expanding and double-clicking this&nbsp;file:</p>
<ul id="download">
<li><a href="/downloads/2008-08/Format-CSS-Single-line.tmMacro.zip">Download the "Format <span class="caps">CSS</span> Single-line" Textmate macro &raquo;</a> (<span class="caps">ZIP</span>,&nbsp;<span class="caps">1KB</span>)</li>
</ul>
<p>While similar to "Format <span class="caps">CSS</span> Compressed", this macro retains a single blank line where your original contained two or more blank lines (helpful if you group your rules), and adds whitespace that matches my standard formatting preferences (which I find makes it easier to scan quickly). To switch between each formatting style, just run each command in turn (via the <em>Bundles</em> menu or the keyboard&nbsp;shortcuts).</p>
<p>However, that wouldn't be much use to everyone who <em>doesn't</em> use Textmate, so here are the respective groups of regex I used for the&nbsp;conversion:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">\n<span style="color: #7a0874; font-weight: bold;">{</span><span style="color: #000000;">3</span>,<span style="color: #7a0874; font-weight: bold;">}</span>
\n\n
&nbsp;
<span style="color: #7a0874; font-weight: bold;">[</span> \t<span style="color: #7a0874; font-weight: bold;">]</span>+
&nbsp;
<span style="color: #7a0874; font-weight: bold;">(</span>?m<span style="color: #7a0874; font-weight: bold;">)</span><span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #7a0874; font-weight: bold;">[</span>;:<span style="color: #7a0874; font-weight: bold;">]</span><span style="color: #7a0874; font-weight: bold;">)</span>\s+
$<span style="color: #000000;">1</span>
&nbsp;
\s<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">}</span>
 <span style="color: #7a0874; font-weight: bold;">}</span>
&nbsp;
\s<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">{</span>\s<span style="color: #000000; font-weight: bold;">*</span>
 <span style="color: #7a0874; font-weight: bold;">{</span> 
&nbsp;
<span style="color: #7a0874; font-weight: bold;">[</span> \t<span style="color: #7a0874; font-weight: bold;">]</span><span style="color: #000000; font-weight: bold;">*</span>,<span style="color: #7a0874; font-weight: bold;">[</span> \t<span style="color: #7a0874; font-weight: bold;">]</span><span style="color: #000000; font-weight: bold;">*</span>
,
&nbsp;
<span style="color: #000000; font-weight: bold;">@</span>import<span style="color: #7a0874; font-weight: bold;">(</span>.<span style="color: #000000; font-weight: bold;">*</span>?<span style="color: #7a0874; font-weight: bold;">)</span>;
<span style="color: #000000; font-weight: bold;">@</span>import$<span style="color: #000000;">1</span>;\n\n</pre></div></div>

<h3>What's&nbsp;missing</h3>
<p>In Textmate and BBEdit I can return to multi-line formatting with a single command, but that might not be as simple in other editors. What I'd love to see is a pair of shell scripts that convert from multi- to single-line and back, and possibly a web-based processor that does the same (paste your style sheet into a textarea, select your formatting, hit "process" and the script produces the result). If anyone would like to take on those tasks, I'll happily update this post to link to the products of your&nbsp;labor.</p>
<h3>And in the&nbsp;end...</h3>
<p>If you've never tried single-line formatting, this makes it easy to experiment without committing yourself (and I do recommend giving it a try--you may be surprised once you've worked with it a few&nbsp;times).</p>
<p>Ultimately, because I can return to multi-line with a single command my primary text editor should I ever feel like it, automating the switch from multi- to single-line is a convenient way to get the benefits of single-line formatting without backing myself or my clients into a formatting&nbsp;corner.</p>
]]></description>
      <pubDate>Sat, 30 Aug 2008 01:03:00 -0700</pubDate>
      <guid>http://virb.com/danrubin/posts/text/798182</guid>
    </item>
    <item>
      <title>Simple CSS Hover Tab Thingy</title>
      <link>http://virb.com/danrubin/posts/text/779977</link>
      <description><![CDATA[<p class="alert"><strong>Update:</strong> The original edit of this post and demo file didn't quite work in <span class="caps">IE6</span>/7 (ok, didn't work at all, really). That's what you get when you rush and/or don't care about certain browsers :) See the comments for my quick explanation of the fix (the demo now works in <span class="caps">FF2</span>/3, Safari 2/3, Opera 9, and&nbsp;<span class="caps">IE6</span>/7).</p>
<p>Ok, so the name won't win any awards, but let's be honest: neither will this mini-tutorial, or the idea itself (nothing groundbreaking here, move along...). But after throwing together a quick little (you guessed it) hover/tab/thingy for my <a href="http://superfluousbanter.org/archives/2008/08/i-need-some-spacing/">previous article</a>, I thought I was fun enough to share, in case you find a need for it&nbsp;someday.</p>
<h3>The usual&nbsp;suspects</h3>
<p>The "thingy" in question is just a simple unordered list, with each list item containing an anchor and an image--we want the images in this case because I want them to display in my <span class="caps">RSS</span> feed and for anyone who can't (or chooses not to) view the styled version of this&nbsp;site.</p>
<p class="info"><strong>Note:</strong> Feel free to reference images in the stylesheet rather than inline if that suits your purposes. Because I know you need permission, don't&nbsp;you...</p>
<p>If you were too lazy to click the link to my <a href="http://superfluousbanter.org/archives/2008/08/i-need-some-spacing/">previous article</a> above (and who could blame you, really), here's a quick <a href="http://superfluousbanter.org/projects/demos/simple-css-hover-tab-thingy/">demo&nbsp;page</a>.</p>
<h3>Moving right&nbsp;along...</h3>
<p>First, the markup (with URLs truncated to save&nbsp;trees):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;hover-tab-thingy&quot;&gt;
  &lt;li id=&quot;one&quot;&gt;&lt;a href=&quot;...&quot;&gt;One &lt;img ... /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li id=&quot;two&quot;&gt;&lt;a href=&quot;...&quot;&gt;Two &lt;img ... /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li id=&quot;three&quot;&gt;&lt;a href=&quot;...&quot;&gt;Three &lt;img ... /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></td></tr></table></div>

<p>Simple, uncluttered, uncomplicated. Just how I know you like&nbsp;it.</p>
<p>Next, the <span class="caps">CSS</span>--not <em>quite</em> as short as the markup, but that's how the story often&nbsp;goes:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">ul<span style="color: #cc00cc;">#hover-tab-thingy</span> <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span>0;
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span>;
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">498px</span>; <span style="color: #00AA00;">}</span>
<span style="color: #cc00cc;">#hover-tab-thingy</span> li <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
  <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span>; <span style="color: #00AA00;">}</span>
<span style="color: #cc00cc;">#hover-tab-thingy</span> li a <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span> <span style="color: #933;">21px</span>;
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#eee</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999</span>;
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span>;
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span>;
  <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span>;
  <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fff</span>; <span style="color: #00AA00;">}</span>
<span style="color: #cc00cc;">#hover-tab-thingy</span> li a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f60</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span>; <span style="color: #00AA00;">}</span>
li<span style="color: #cc00cc;">#one</span> a<span style="color: #00AA00;">,</span>
li<span style="color: #cc00cc;">#one</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#e5e5e5</span>;
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#555</span>; <span style="color: #00AA00;">}</span>
<span style="color: #cc00cc;">#hover-tab-thingy</span> li a img <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span>;
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span>0;
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span>;
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span>;
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">460px</span>;
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-9999px</span>;
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span>;
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#e5e5e5</span>; <span style="color: #00AA00;">}</span>
li<span style="color: #cc00cc;">#one</span> a img<span style="color: #00AA00;">,</span>
<span style="color: #cc00cc;">#hover-tab-thingy</span> li a<span style="color: #3333ff;">:hover </span>img <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span>0; <span style="color: #00AA00;">}</span>
li<span style="color: #cc00cc;">#two</span> a<span style="color: #3333ff;">:hover </span>img<span style="color: #00AA00;">,</span>
li<span style="color: #cc00cc;">#three</span> a<span style="color: #3333ff;">:hover </span>img <span style="color: #00AA00;">{</span>
  <span style="color: #000000; font-weight: bold;">border-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f60</span>; <span style="color: #00AA00;">}</span></pre></td></tr></table></div>

<p>This is all fairly straightforward, so here are the highlights that may help when duplicating this on your&nbsp;own:</p>
<ol>
<li>The entire idea is that you have tabs that are each associated with content (images in this case) which are made visible when the user hovers over the tab. There are more things you could do with this, but that's your job,&nbsp;grasshopper.</li>
<li>The tabs are floated; the content elements (img in this case) clear the&nbsp;floats.</li>
<li>The content elements are set to position:absolute, so they can appear in the same location for each tab. To accomplish this, the ul is set to position:relative (in short: an absolutely positioned element will be positioned relative to its nearest positioned ancestor--see <a href="http://www.stopdesign.com/articles/absolute/">Doug Bowman's great write up</a> for more), and it's probably a good idea if the dimensions of your ul (the container for your content) have a lot in common with those of your content&nbsp;elements.</li>
<li><span class="caps">IE6</span> has a problem reverting elements that set display:block on :hover to their original state (e.g. display:none). To counter this, use a negative left margin as the default positioning, and then set margin-left:0; on the hover state, which works in all modern&nbsp;browsers.</li>
<li>The width and height is specific to my example (the dimensions of the images I used), ditto for the padding on the tabs and the top positioning on the img elements (to push them below the tabs). Bend them to your&nbsp;will.</li>
<li>Everyone dies at the end of <em>The Departed</em>. Seriously, everyone. That should be the subtitle of the&nbsp;movie.</li>
</ol>
<h3>Obligatory&nbsp;wrap-up</h3>
<p>This may be something that you'll find use for on a regular basis--one of those tiny snippets of reusable "stuff" that you'll be glad you don't have to type every time. Or you'll never need it because you can't for the life of you think of any reason why you'd need to reveal some content whilst hovering over a tab (I'm pretty much just painting the sarcasm with a roller at this&nbsp;point...).</p>
<p>Whatever your future may hold, now you have something you might not have had before, and that's never a bad thing--unless we're talking about some sort of disease, in which&nbsp;case...</p>
]]></description>
      <pubDate>Tue, 19 Aug 2008 17:31:31 -0700</pubDate>
      <guid>http://virb.com/danrubin/posts/text/779977</guid>
    </item>
  </channel>
</rss>
