<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>Blog</title>
    <link>http://www.elfboy.com/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>info@elfboy.com</dc:creator>
    <dc:rights>Copyright 2012</dc:rights>
    <dc:date>2012-03-22T17:50:26+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>Transitioning to In&#45;House</title>
      <link>http://www.elfboy.com/site/transitioning_to_in_house</link>
      <guid>http://www.elfboy.com/site/transitioning_to_in_house#When:17:50:26Z</guid>
      <description>A few weeks ago an industry peer of mine that I&#8217;ve met once here in Portland contacted me to tell me that the company he works for is hiring. I wasn&#8217;t really interested. I&#8217;m a freelancer running my own business. Between international travel and a one&#45;year stint with another company, it&#8217;s been that way for 12 years. I love it: the flexibility, the diversity, working with clients. And yet my friend kept encouraging me to look into it, so I sent in an application and my resume (which took a little dusting).

Here I am now, a few weeks later, finishing up the major work on my last freelance job before my full time in&#45;house one begins.

After going through interviews and meeting with several people in the company, I decided to accept their offer of employment. WebTrends really seems to be a fantastic place to work. When I hear employees say that what draws them back is the people they work with and the culture of the company, it makes me stop and consider. That&#8217;s a place I want to work: not only where the company takes care of its employees, but where the employees build real friendships with each other and are more than coworkers.

I&#8217;m not finished with freelance though. Of course I&#8217;ll always have my own little projects going on behind the scenes. In addition, I plan on taking a few select clients. Sure, time will be limited, but because of that and the fact that I&#8217;ll have a steady paycheck I can be very selective with the projects I choose. This means I can work only on jobs I really believe in which means I&#8217;ll be motivated to put in my best work which in turn means the client gets the best results as well! (So hey, if you have a rockin&#8217; project, let me know and maybe we can work together).

So Monday things will be quite different, and I&#8217;m excited for that change!</description>
      <dc:subject>Business, Life,</dc:subject>
      <dc:date>2012-03-22T17:50:26+00:00</dc:date>
    </item>

    <item>
      <title>Random PHP Password Generator</title>
      <link>http://www.elfboy.com/site/random_php_password_generator</link>
      <guid>http://www.elfboy.com/site/random_php_password_generator#When:07:05:39Z</guid>
      <description>A project I was working on the other day needed an automatically generated password. I had an old script that spat out a really basic alphanumeric 6&#45;character password, but I wanted something a bit stronger and more versatile. I thought I&#8217;d share. This code will give you a default of 8 characters, alphanumeric plus special characters, with flexibility for whatever length you want. The implementation is nothing fancy.Code:
Random Password: &amp;lt;br /&amp;gt;
&amp;lt;?php
$len = isset($_GET[&apos;len&apos;]) ? $_GET[&apos;len&apos;] : 8;
$pw = &apos;&apos;;
for($i=0; $i</description>
      <dc:subject>Programming,</dc:subject>
      <dc:date>2012-02-21T07:05:39+00:00</dc:date>
    </item>

    <item>
      <title>Making Repeatable Background Stripes</title>
      <link>http://www.elfboy.com/site/making_repeatable_background_stripes</link>
      <guid>http://www.elfboy.com/site/making_repeatable_background_stripes#When:06:26:15Z</guid>
      <description>Last week I was looking for a way to create a background of alternating colored stripes for an entire web page or element. I needed to be able to easily change the colors so I wanted to do it with CSS and not images, but without adding a bunch of extra DIVs (which wouldn&#8217;t have worked anyway). I looked into gradients, but without knowing how tall the display area was, that wouldn&#8217;t work either. Plus, a gradient of that size would be hugely resource intensive. That&#8217;s when I remembered SVG.SVG is a graphic made out of XML style code. I won&#8217;t go into a full blown tutorial, as I&#8217;m not familiar enough with SVG and I&#8217;m sure there are many fantastic resources out there if you just Google. Basically, what I was able to do was to create, using XML&#45;based SVG code, an image that is 1 pixel wide by 100 pixels tall. The top 50 pixels are one color, the bottom, another. Here&#8217;s an example of the code:
&amp;lt;svg width=&quot;100&quot; height=&quot;100&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&amp;gt;
 &amp;lt;!&#45;&#45; Created with SVG&#45;edit &#45; http://svg&#45;edit.googlecode.com/ &#45;&#45;&amp;gt;
 &amp;lt;g&amp;gt;
  &amp;lt;title&amp;gt;Layer 1&amp;lt;/title&amp;gt;
  &amp;lt;rect id=&quot;svg_1&quot; height=&quot;50&quot; width=&quot;100&quot; y=&quot;0&quot; x=&quot;0&quot; fill=&quot;#FF0000&quot;/&amp;gt;
  &amp;lt;rect fill=&quot;#00FF00&quot; x=&quot;0&quot; y=&quot;50&quot; width=&quot;100&quot; height=&quot;50&quot; id=&quot;svg_2&quot;/&amp;gt;
 &amp;lt;/g&amp;gt;
&amp;lt;/svg&amp;gt;

(Note the comment in there, I used that editor to generate the code. It looks like a great learning tool! Check it out.)

Here&#8217;s a live version of that code.

 
 
  Layer 1
  
  
 



This is what you should see if your browser can display SVG.


Shush. Don&#8217;t judge my color choices.

Now, since that&#8217;s just code it&#8217;s really easy to swap out of the colors depending on your needs. Especially with a little bit of PHP in there. I grab my colors out of a database, but they could just as easily be in an array. For example:
&amp;lt;?php
header(&quot;Content&#45;type: image/svg+xml&quot;);
$colors = array(&apos;#ff0000&apos;, &apos;#00ff00&apos;);
?&amp;gt;

&amp;lt;svg width=&quot;100&quot; height=&quot;100&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&amp;gt;
 &amp;lt;!&#45;&#45; Created with SVG&#45;edit &#45; http://svg&#45;edit.googlecode.com/ &#45;&#45;&amp;gt;
 &amp;lt;g&amp;gt;
  &amp;lt;title&amp;gt;Layer 1&amp;lt;/title&amp;gt;
  &amp;lt;rect id=&quot;svg_1&quot; height=&quot;50&quot; width=&quot;100&quot; y=&quot;0&quot; x=&quot;0&quot; fill=&quot;&amp;lt;?php echo $colors[0] ?&amp;gt;&quot;/&amp;gt;
  &amp;lt;rect fill=&quot;&amp;lt;?php echo $colors[1] ?&amp;gt;&quot; x=&quot;0&quot; y=&quot;50&quot; width=&quot;100&quot; height=&quot;50&quot; id=&quot;svg_2&quot;/&amp;gt;
 &amp;lt;/g&amp;gt;
&amp;lt;/svg&amp;gt;


Save that as a .php file and you&#8217;re good to go. It&#8217;s important to notice the content&#45;type being set by the header() function. This makes sure the browser treats the output as SVG.

Lastly, in my CSS file I simply set the above PHP file as the source for my background: url().
.stripes {
    background: url(your&#45;php&#45;generated&#45;svg.php);
}

That will repeat across the x&#45; and y&#45;axes. You could also use background&#45;size to change the size since it&#8217;s a scalable vector.

Don&#8217;t forget to know when you can use it!

Update 22&#45;Feb&#45;2012:
I just stumbled across this CSS declaration today: repeating&#45;linear&#45;gradient Looks like that might be problem solved!</description>
      <dc:subject>Education, Programming,</dc:subject>
      <dc:date>2012-02-15T06:26:15+00:00</dc:date>
    </item>

    <item>
      <title>Frustrated? No.</title>
      <link>http://www.elfboy.com/site/frustrated_no</link>
      <guid>http://www.elfboy.com/site/frustrated_no#When:03:56:13Z</guid>
      <description>A couple weeks ago Jeffrey Zeldman wrote an article about responsive design and where breakpoints can be set in the underlying media queries. The article discusses the difficulties with the fact that there are literally hundreds of screen resolutions across a myriad of iOS, Android, and Windows Phone devices. There isn&#8217;t a set group of width breakpoints to set your media queries at for altering your site or apps layout and design.If you haven&#8217;t read it yet, take a few minutes today to do so. It&#8217;s a really useful article. (And let me quickly say I&#8217;m not harshing on Zeldman in this article. I love and respect what he has done for the industry. I&#8217;m making a bit of a side point in part to remind and excite myself.)

At one point in the article Zeldman says, &#8220;This is a frustrating time to be a web designer, but it’s also the most exciting time in ten years.&#8221; and earlier &#8220;In the short run it’s going to be hell&#8230;But it is the short run.&#8221;

While he does give the caveats of it being the short run and the most exciting time, I have to ask, is this really a frustrating time to be a web designer? I think it&#8217;s just a time to be a web designer. Because it&#8217;s always been like this: the browser wars, poorly supported CSS, poorly supported media, bandwidth holding us back, tables and floats fighting an inefficient battle to accomplish our layout desires, Flash, and a lot of little bugs and quirks along the way (actually, things are so quirky out here that there&#8217;s an industry term around it!).

So is it really frustrating? Isn&#8217;t it just what it means to be a web designer? I&#8217;m not saying there isn&#8217;t room for improvement. We should always be trying to better ourselves and the industry. But it&#8217;s what we do! We live out here, on the edge, pushing technology forward and making it better. For those of us who thrive on that and want to keep making things better, there will never be a time where it all makes sense and is easy. But I don&#8217;t think we want that. We&#8217;re striving for perfection and there&#8217;s a lot of philosophical debate on whether the attainment of that is possible, but the fight for it is worthwhile.

In the end, I&#8217;d like to just make a minor modification to Zeldman&#8217;s words: This is the time to be a web designer, it’s the most exciting time in ten years. And you know what, we&#8217;re constantly getting better so it will continue to be the most exciting time to be a web designer!</description>
      <dc:subject>Business, Education, General,</dc:subject>
      <dc:date>2012-01-19T03:56:13+00:00</dc:date>
    </item>

    <item>
      <title>Dumb Hackers</title>
      <link>http://www.elfboy.com/site/dumb_hackers</link>
      <guid>http://www.elfboy.com/site/dumb_hackers#When:01:25:07Z</guid>
      <description>Aaanndd I&#8217;m finally back after being hacked. Hopefully you all can access those articles you were looking for and I can start writing some new ones!</description>
      <dc:subject></dc:subject>
      <dc:date>2011-11-25T01:25:07+00:00</dc:date>
    </item>

    <item>
      <title>Typekit Goes to Adobe</title>
      <link>http://www.elfboy.com/site/typekit_goes_to_adobe</link>
      <guid>http://www.elfboy.com/site/typekit_goes_to_adobe#When:03:07:02Z</guid>
      <description>Earlier today the web font service Typekit announced that it has been acquired by Adobe. Is it time to host your own fonts (again)?There has been quite the mixed reaction to this. Not only people completely against it and those totally for it, but most comments and tweets I&#8217;ve seen in reaction to the announcement show most people (myself included) both happy for those currently working for Typekit and worried about the future.

It seems that a lot of people in the web industry have a love/hate relationship with Adobe. While they make the best design products out there, they aren&#8217;t particularly loved for all the flaws software of that size comes often has. They&#8217;ve been known to not manage new acquisitions the best. Hello Macromedia. And honestly, how often does a big company snapping up an innovative small one end well for said innovation? It seems that the large corporations can&#8217;t innovate on their own so they just make a business of buying up other people&#8217;s brilliant work and calling it their own.

But what I&#8217;m really worried about is the future. I use Typekit on a handful of sites. I would like to continue doing so. But this is a hosted service. And just like Delicious and relics of the past like GeoCities, we&#8217;ve seen that if you don&#8217;t have the data on your own server, you cannot be sure it will always be there for you. Fonts are hardly your own content, but the idea is the same. If you don&#8217;t &#8220;own&#8221; it, you could lose it. If things go south, I&#8217;m going to really wish I just purchased the font licensing and hosted them myself. Yeah, it&#8217;s a bit more of a hassle for sure, and with all the little adjustments in rendering Typekit does to help, it isn&#8217;t quite the same as hosting your own email. Nevertheless, this just seems to add to the argument to host your own stuff so you can keep it around. Like everyone else, I really hope Adobe proves us all wrong and continues to supply a fantastic font embedding service at a reasonable price.</description>
      <dc:subject>Business,</dc:subject>
      <dc:date>2011-10-04T03:07:02+00:00</dc:date>
    </item>

    <item>
      <title>Help with OAuth (in PHP)</title>
      <link>http://www.elfboy.com/site/help_with_oauth_in_php</link>
      <guid>http://www.elfboy.com/site/help_with_oauth_in_php#When:08:16:55Z</guid>
      <description>For the past week or so I&#8217;ve been learning OAuth to use as the login functionality and authorization for a personal app I&#8217;m making (shh, it&#8217;s a secret.). I&#8217;ve played with OAuth a little in the past while tinkering with another app to connect to Foamee via Twitter, but that was relatively easy as the library I used already did most of what I wanted. This time around it was much harder. Maybe it was difficult because I don&#8217;t come from any sort of deep programming background, or maybe because I approached it thinking it would be a cake&#45;walk. In any case, I wanted to give a couple of thoughts about what I learned. They probably seem really silly and basic, but they were my mental hurdles and maybe they&#8217;ll be yours too). This won&#8217;t be a step&#45;by&#45;step how&#45;to, but maybe it will help you wrap your head around somethings.

These are somewhat disjointed thoughts, but afterward I will give a basic walk through that hopefully will flesh out some details too. I&#8217;m trying to hit on points that stumped me some in hopes that it will help you move forward and learn quicker than me.One.
While I don&#8217;t want to reveal too much of what I am working on quite yet, it does use Google&#8217;s API (hence the need for OAuth). Google has extensive documentation, but it isn&#8217;t always up to date. With such a wide range of technologies and versions, just be prepared to do a little sleuthing and trial and error to find which version of an API you need to use. In addition to that, the discussion lists are great resources. Search them. Not only are others possibly dealing with similar issues, but Google employees and programmers are helping and posting answers there.

Two.
Code libraries are not silver bullets. I&#8217;m writing my app in PHP. A library can save you from writing a lot of code, but you still need to have a bit of a grasp behind the technology. I found that the libraries I looked at were either bloated, trying to do everything (which complicates the issue if you don&#8217;t completely understand the technology), or they were so basic that some core functionality, it would seem, wasn&#8217;t there. I ended up writing in some modifications to one of the libraries I used. Understand that a code library is not plug&#45;and&#45;play. You still need to learn its functions and how to use it. Hopefully it has good documentation, but that&#8217;s not always true. Read through the code and comments. Read discussion boards.

Three.
Because of what I&#8217;m doing, OAuth in the Google API wasn&#8217;t enough. I needed to also use OpenID to connect. So I switched from OAuth doing both authentication (logging in) and authorization (allowing me access to user data) to just the latter. So I had to figure out how to use OpenID for authentication and make it play nice with OAuth. Yes, dancing between multiple APIs and similar words was confusing. The PHP libraries for these are written in classes (object orientated programming &#45;&gt; OOP). I learned PHP before it did OOP well so that was a little added learning too. I knew the idea behind the practice, but I recommend if you don&#8217;t already have a handle on classes that you learn that before jumping in. Just get a basic understanding, nothing major. Learn about private, public, protected and how the general concept works.

Four.
The last thing I learned, and probably what should have been the simplest, but I struggled with, is how to implement the GET and POST requests from the Google API. I&#8217;ll claim that my brain was fried after a week of pouring through API docs, multiple libraries, official specs, and new programming methods. For example, this is what Google tells you to do to find a users recent public activity in Google Buzz:
&#8220;GET https://www.googleapis.com/buzz/v1/activities/googlebuzz/@public&#8221;
I wasn&#8217;t sure what to do with that at first, especially when it came to POST methods. Is that some sort of command line thing? Or is it just a cryptic generic command? I&#8217;ve found that it&#8217;s never really explained with these things. When you go to get a code base from Google Code the first way they provide it is using SubVersion through a command line:
&#8220;svn checkout http://gdata&#45;samples.googlecode.com/svn/trunk/ gdata&#45;samples&#45;read&#45;only&#8221;
Yeah, I&#8217;m sorry, this is 2011, and I use a GUI operating system. Can&#8217;t you just give me a ZIP? Yes, they link to client programs that can access the SVN, but it&#8217;s an afterthought. 

The whole thing is really not set up in a manner that makes for an easy entry point. Which I think is the whole problem. You are told what to do, but not how to do it. Nothing I learned this week was exceptionally difficult, but it was poorly explained which steepened the learning curve.

To get back to the API commands, figure out how to do a GET or POST in whatever language you are using. For me with GETs that meant I had to use OAuth to create a URL to access with file_get_contents() or cURL. I believe there are other options as well. The OAuth library builds the URL for you as you need to have your special parameters attached to it that give authorization to the data. It isn&#8217;t needed to create this URL, but it&#8217;s easier than doing it yourself (though, it is like doing it yourself, just with pre&#45;fabricated code).

When it came to POST, I stuttered for a while. You have to send data, but not as normal query string parameters (those are GET variables). The data is part of the &#8220;body&#8221; of the request. Really, my best advice here is to read and use this. Be sure to read a few comments too. Your web server may not allow the PHP function fopen() and you may need to use cURL. cURL is very common so you should be able to find a lot of help on it.

Five.
Lastly, just keep trying and pushing. Take it in little pieces. Each step of the OAuth or OpenID connection at a time. I wish I could give easy step by step instructions, but there are resources out there for that. Google does a decent job explaining the OAuth flow. The harder part is keeping it all in your head and using it for your specific project. And since each project is unique, it&#8217;s not easy to give a list of what you should do to achieve your goals.

OAuth Walk&#45;through.
Okay, with those thoughts there, here is a small explanation of how OAuth happens. Read a few of these articles, it will make things clearer.

OAuth is a way for your application to access the user&#8217;s data within another application. Your application needs to send the user to the site with data you want to access to have them log in and approve your application. (The point of this is to keep your app from ever needing to see their login credentials) So, in your application, you give the user a way to start the process: a link or button for example. When this is clicked, your app needs a Request Token to give to the user when they go to authenticate. So the click loads a script on your app which builds a URL (given by the API). This is where the OAuth library is helpful – in building these URLs. Then the app performs a GET of that URL. In PHP I used file_get_contents() to do this. At this point, the user is technically still on your website loading data on your files. Your file has gone and retrieved data from another site, but the user has not left. The returned data includes the Request Token and Secret. Attach these items to another API supplied URL and then send</description>
      <dc:subject>Education, Programming,</dc:subject>
      <dc:date>2011-06-15T08:16:55+00:00</dc:date>
    </item>

    <item>
      <title>Making CSS Drop Down Menus Work on the iPhone</title>
      <link>http://www.elfboy.com/site/making_css_drop_down_menus_work_on_the_iphone</link>
      <guid>http://www.elfboy.com/site/making_css_drop_down_menus_work_on_the_iphone#When:06:00:26Z</guid>
      <description>Today I spent a while struggling to get a CSS drop down menu to work on the iPhone. The short of it is that you need to either explicitly set display: none; on the secondary list and change it to block or any visible setting on :hover or, I stumbled on this later, you need to specify a width on the drop down unordered list (and not it&#8217;s list item children). If you&#8217;re curious for more, keep reading.I recently had a client ask if I could get the drop down menus on his website to work on the iPhone. We hadn&#8217;t done anything special for mobile devices on this project, but basic navigational functionality is of course very important. I was surprised at the request because sites I&#8217;ve done before have used drop downs that worked. What was different here? If you&#8217;ve used a drop down menu on the iPhone before you know what to expect. On the first tap of the top level navigational item the second level list appears (and the link you clicked on seems to show it&#8217;s activated state &amp;gt;&#8212;not tested). You can then select a secondary item or tap again on the main link to follow it. However, on this particular site, when the top item was tapped the drop down would display, but before anything could be done the link would be followed and you would be taken to that page. Good luck trying to stop the browser load or selecting a sub&#45;link first!

After a long and fruitless search on the web I started asking some friends of mine for help and looking at sites they had developed. I noticed all the sites with correctly functioning iPhone friendly drop down menus use JavaScript.

Meh.

I&#8217;ve used SuckerFish before and it is a great script, but I&#8217;m more happy with a pure CSS solution (and I&#8217;m not supporting dead versions of IE). So I did a little sleuthing and discovered that all of these JS enabled websites toggle the display CSS rule of the sub&#45;menu between none and block. My CSS code was toggling the left rule from &#45;999em to auto alone. So I did some testing of different combinations and discovered that the display rule is the only one that matters. No JavaScript is required as long as you explicitly set display: none; as the initial rule for the sub&#45;menu. And then on :hover you just change display to any visible option you want.

Try it out for yourself. Below are two CSS only drop down menus. Both will work in a desktop browser, but only the second will work correctly on an iPhone. Here are the two declarations that are added for the working drop down:
#ios ul { display: none; }
#ios li:hover ul { display: block; }

Update: As I&#8217;ve been testing this out, I just realize that setting a width on the drop down secondary list will also make it work. It doesn&#8217;t need to be on hover of course then, just on the initial declaration.</description>
      <dc:subject>CSS, Education, HTML,</dc:subject>
      <dc:date>2011-03-24T06:00:26+00:00</dc:date>
    </item>

    <item>
      <title>An Idea to Help Christchurch</title>
      <link>http://www.elfboy.com/site/an_idea_to_help_christchurch</link>
      <guid>http://www.elfboy.com/site/an_idea_to_help_christchurch#When:15:53:14Z</guid>
      <description>For the past day and a half I have been glued to my computer screen watching streaming news coverage of the tragic earthquake that devastated Christchurch, New Zealand. I want to help, but I&#8217;m living in America. Then I had an idea that maybe I could help people in the web industry so they could help themselves and others there on the ground. This is a letter to Christchurch web designers.Dear Web Designers &amp;amp; Developers in Christchurch,

The first thing that needs to be said is to all Canterburians and Kiwis at large and is that my heart goes out to you all affected by the tragedy of the earthquake. My prayers are for you and your loved ones, and my thoughts are with you all. I lived in Christchurch for a short time, but even being only a temporary resident it is heartbreaking to watch the news coverage. I&#8217;m still waiting to hear about the safety of a couple of friends. I can&#8217;t imagine the strength it takes to walk through what you are experiencing.

I want to help, but what can I do some 12,000km away? I can&#8217;t move rubble, I can&#8217;t offer housing, I can&#8217;t make you a hot meal, or even give you a comforting hug and shoulder to lean on. I&#8217;m not really even in a position to help much financially, though I am going to try to see if I can give to the Red Cross.

So what can I do? I don&#8217;t know, but here&#8217;s an idea. I&#8217;m just going to throw it out there and we can work out the &#8220;how.&#8221; I&#8217;m a web designer and developer. I don&#8217;t have a huge workload currently. Last I heard 50% of Christchurch was out of power and of course the CBD is closed down. Maybe I can help out those of you who are in the web industry by helping you complete your projects. Maybe you had client work that was supposed to be done in the next couple of weeks. Even if you have your laptop out to an Internet connection, my guess is work will not be full steam ahead for a while, and probably shouldn&#8217;t.

That&#8217;s my idea then. Can I help any Christchurch web agencies or freelancers with immediate needs? Maybe just taking some of the workload will give you the chance to go spend time with your mum or help your neighbors. Some of my friends in the New Brighton area were asking for help getting their house and yard in order. I&#8217;ll handle some of your web projects, you take care of yourself and neighbors. Who knows, maybe others in the industry around the world will step forward too.

Details? I don&#8217;t know, let&#8217;s not worry about that. This is about how I can help the country and city I consider my second home while I&#8217;m still in America. I&#8217;ll be over for a visit in a few weeks and hopefully I can help in other ways then. For now, this is all I&#8217;ve been able to come up with.

There&#8217;s a contact form here you can reach me at or on Twitter @philiprenich

With lots of love,
Philip</description>
      <dc:subject>Business, Life, Personal, Travel,</dc:subject>
      <dc:date>2011-02-23T15:53:14+00:00</dc:date>
    </item>

    <item>
      <title>CSS3 Multiple Background Images</title>
      <link>http://www.elfboy.com/site/css3_multiple_background_images</link>
      <guid>http://www.elfboy.com/site/css3_multiple_background_images#When:03:15:44Z</guid>
      <description>For the past several weeks, I&#8217;ve been working on an iPad project that makes copious use of buttons for navigation. These buttons consist of text, an icon, and a gradient. As my only browser is the iPad&#8217;s flavor of Safari, I can use a lot more fun CSS3. I decided to use multiple background images to display the gradient and icons, but have run into some issues that I would like some help with when it comes to the hover state.According to the CSS3 spec for backgrounds and borders module, the allowed values for background&#45;image are a color, an image, none (the default), or inherit. Now the way multiple backgrounds work is that you list each one in the background&#45;image property in a comma separated list which appear in a descending order of top to bottom visually. You then can use the other background properties to manipulate each one, using the same comma style.

Here&#8217;s my problem. When the user hovers (or touches in the iPad case) the button I am changing the color of the gradient. I have a lot of these buttons, each with a unique icon but the same gradients. I would like to declare only once in my CSS what the hover state does. However, it seems that it is impossible to change only the gradient without mentioning the icon as well, as there are two backgrounds per button. By not declaring the icon it is removed on hover. This means that for every unique button, I must have a unique hover rule as well. (As an aside it also means that every button declaration in the CSS requires me to not only specify the unique icon, but to repeat the gradient code as well)

I would like to try to find a way, if possible, to only have to declare the hover state one time for all buttons so that the icon would remain declared automatically from the normal state. I&#8217;ve tried &#8220;inherit&#8221; and that just breaks the rule completely. Has anyone ever tried this and found a method?

Here&#8217;s a quick little page to demonstrate what I am talking about (WebKit or Firefox). Please leave any ideas or thoughts in the comments. Thank you!</description>
      <dc:subject></dc:subject>
      <dc:date>2011-02-02T03:15:44+00:00</dc:date>
    </item>

    
    </channel>
</rss>
