<?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>CSSKarma &#187; Web Development</title> <atom:link href="http://www.csskarma.com/blog/category/web-development/feed/" rel="self" type="application/rss+xml" /><link>http://www.csskarma.com/blog</link> <description>display your style</description> <lastBuildDate>Tue, 31 Jan 2012 15:18:44 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Changing History with HTML 5</title><link>http://www.csskarma.com/blog/changing-history-with-html-5/</link> <comments>http://www.csskarma.com/blog/changing-history-with-html-5/#comments</comments> <pubDate>Fri, 19 Aug 2011 13:49:30 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[api]]></category> <category><![CDATA[history]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[javascript]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=953</guid> <description><![CDATA[Here&#8217;s the demo for those who like to jump right in. The URL is an important piece of user experience in any Web site or application. We like using, what we call &#8220;talking URLs&#8221; so they&#8217;re easy to say and remember, like clearleft.com/is/richardrutter (one of the best all time). But as we build complex ajax [...]]]></description> <content:encoded><![CDATA[<p><strong><a
href="http://www.csskarma.com/lab/html5/history">Here&#8217;s the demo</a></strong> for those who like to jump right in.</p><p>The URL is an important piece of user experience in any Web site or application. We like using, what we call &#8220;talking URLs&#8221; so they&#8217;re easy to say and remember, like <a
href="http://clearleft.com/is/richardrutter/">clearleft.com/is/richardrutter</a> (one of the best all time).</p><p>But as we build complex ajax and javascript-base apps with wild interfaces, we sometimes forget about the URL and just how important it is.</p><p>The HTML 5 History API aims to deal with that problem by letting you access the address bar directly and create <em>pushes</em> to change the URL and inject (same domain) history into the browser.</p><h3>Feature detection</h3><p>Step 1 to using any of the new HTML 5 goodies is testing for support. The History API works where you would expect it to (Gecko &#038; Webkit, not sure about IE9). Testing for support is pretty basic:</p><h4>Regular JS</h4><pre><code>if (typeof history.pushState !== "undefined") {
    <span>//history api is supported</span>
}</code></pre><h4>With modernizr</h4><pre><code>if (Modernizr.history) {
     <span>// history api is supported</span>
}</code></pre><h3>The History Push</h3><pre><code>if (typeof history.pushState !== "undefined") {
     history.pushState([state to track], '[page title]', '[pushed URL]');
}</code></pre><h4>The pieces</h4><p><strong>State</strong>: This data will be passed into the &#8220;popstate&#8221;, which deal with things like when the user click the back button.</p><p><strong>Page title</strong>: This is the title that you see when you click and hold the back button (the menu that pops up) &#8211; not totally supported yet</p><p><strong>Pushed URL</strong>: this is the url you want to display in the address bar. It&#8217;s only limitation is that is has to be in the same domain (security).</p><h4>Worked out history push</h4><pre><code>if (typeof history.pushState !== "undefined") {
     history.pushState(null, 'I love dogs', 'dogsrock.html');
}</code></pre><p><strong><a
href="http://www.csskarma.com/lab/html5/history">In this demo</a></strong>, you can see the URL changing but the page not reloading.</p><p>This is basically a slimmed down version of the <a
href="http://diveintohtml5.org/history.html">Dive in HTML5</a> documentation with some modifications to the history code, I slimmed down the detection a bit.</p><p>As usual, any comments, questions, criticisms are welcome. I left the back button broken so you can see it actually working.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/changing-history-with-html-5/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>HTML 5 Form Validation with Yepnope Fallback</title><link>http://www.csskarma.com/blog/form-validate-yepnope-fallback/</link> <comments>http://www.csskarma.com/blog/form-validate-yepnope-fallback/#comments</comments> <pubDate>Thu, 04 Aug 2011 13:39:03 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[forms]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[performance]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=940</guid> <description><![CDATA[In my last post about creating a proper fallback when using the new HTML 5 form validation I mentioned using modernizr to detect for support, then creating an if statement to call the jQuery validate plugin. One of the commentors mentioned using yepnope for this instead of loading the jQuery validation plugin by default. Since [...]]]></description> <content:encoded><![CDATA[<p>In my <a
href="http://www.csskarma.com/blog/required-input-fallback/" title="Required input fields with JS fallback">last post</a> about creating a proper fallback when using the new HTML 5 form validation I mentioned using modernizr to detect for support, then creating an if statement to call the jQuery validate plugin.</p><p>One of the commentors mentioned using yepnope for this instead of loading the jQuery validation plugin by default. Since modernizr has yepnope now anyway, I thought it was a good idea. And here we are with some ne code to look at.</p><p><a
href="http://www.csskarma.com/lab/_javascript/no_require/">View the demo</a></p><h3>Dependencies</h3><ul><li><a
href="http://www.jquery.com">jQuery</a></li><li><a
href="http://www.modernizr.com/">Modernizr (with yepnope)</a></li><li><a
href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validate plugin</a></li></ul><h3>The HTML</h3><pre><code>&lt;form action="" method="post"&gt;

    &lt;ul&gt;
        &lt;li&gt;
            &lt;label for="name"&gt;Name&lt;/label&gt;
            &lt;input type="text" name="name" id="name" required&gt;
        &lt;/li&gt;
        
        &lt;li&gt;
            &lt;label for="email"&gt;Email&lt;/label&gt;
            &lt;input type="email" name="email" id="email" required&gt;
        &lt;/li&gt;
    
        &lt;li&gt;
            &lt;button type="submit"&gt;Submit&lt;/button&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    
&lt;/form&gt;</code></pre><h3>The JS</h3><pre><code>(function ($) {

	<span>// set and cache some variables, change var forms to whatever forms you want to validate</span>
	var forms = $('form'),
		formsCount = forms.length,
		items = forms.find('input[required]'),
		count = items.length;

	<span>// check for "required" input support with modernizr</span>
	if (Modernizr.input.required) {

		<span>// do something else, maybe customize the output messages?</span>

	} else {

		<span>// loop though each required input and set the required and type class jQuery validate needs</span>
		for (var i = 0; i < count; i += 1) {
			var obj = items[i];
			$(obj).attr('class', 'required ' + obj.getAttribute('type')).removeAttr('required');
		};

		<span>// after the classes are set, load in the plugin with yepnope , you can do this with Modernizr.load as well</span>
		yepnope([{
			load: 'js/validate.js',
			complete: function () {

				<span>// after the plugin is loaded, call the method on each form listed at the top</span>
				for (var i = 0; i < formsCount; i += 1) {
					$(forms[i]).validate();
				}
			}
		}]);

	} <span>// if required supported</span>

}(jQuery));
</code></pre><p>I&#8217;m not really a fan of script loaders, especially when using them to load a core script file, like jQuery, but I think this is actually a pretty good use of yepnope.</p><p>I don&#8217;t know about you folk(s), but I&#8217;ll be using this moving forward. Any comments/corrections are obviously welcome.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/form-validate-yepnope-fallback/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Required input fields with JS fallback</title><link>http://www.csskarma.com/blog/required-input-fallback/</link> <comments>http://www.csskarma.com/blog/required-input-fallback/#comments</comments> <pubDate>Wed, 15 Jun 2011 01:22:26 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[forms]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[ui]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=924</guid> <description><![CDATA[View the demo One of my favorite features of the HTML 5 forms is the &#8220;required&#8221; attribute. But unfortunately, support isn&#8217;t totally there yet. So we need to create fallbacks. It works in the modern browsers you&#8217;d expect it to (FF4, Safari, Opera, etc) but in older browsers, form validation isn&#8217;t something you can really [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.csskarma.com/lab/html5/input.required/">View the demo</a></p><p>One of my favorite features of the HTML 5 forms is the &#8220;required&#8221; attribute. But unfortunately, support isn&#8217;t totally there yet. So we need to create fallbacks.</p><p>It works in the modern browsers you&#8217;d expect it to (FF4, Safari, Opera, etc) but in older browsers, form validation isn&#8217;t something you can really ignore (like border-radius) or you&#8217;ll get flooded with all sorts of nastiness and spam. Sure we should be doing it at the server level anyway, but you still want that client side layer to add a bit of UX charm to your form.</p><p>We can still use the new required attribute effectively by creating a JavaScript fallback for unsupported browsers.</p><p>In this <a
href="http://www.csskarma.com/lab/html5/input.required/">demo</a>, I&#8217;m using:</p><ul><li><a
href="http://jquery.com/">jQuery</a></li><li><a
href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validation</a></li><li><a
href="http://www.modernizr.com/">Modernizr</a></li></ul><h3>The HTML</h3><p>The HTML is very basic, just an HTML5 form, with 2 inputs: text (name), and email (email). I&#8217;m using 2 form types to show how we add classes to support the <a
href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/">jQuery Validation</a>. You can, of course, use whatever validation method you&#8217;d like.</p><pre><code>&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
&lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; required&gt;

&lt;label for=&quot;email&quot;&gt;Email&lt;/label&gt;
&lt;input type=&quot;email&quot; name=&quot;email&quot; id=&quot;email&quot; required&gt;

&lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
&lt;/form&gt;</code></pre><h3>The JavaScript</h3><p>With the JavaScript, we first make the check for &#8220;required&#8221; support. I&#8217;m using <a
href="http://www.modernizr.com/">Modernizr</a> for this.</p><p>I left an open block in the if statement in case you want to do something else in there, but you could remove the <code>else</code> and replace the first line with it&#8217;s inverse <code>if (!Modernizr.input.required) {</code> if you don&#8217;t plan on using it for anything.</p><p>If &#8220;required&#8221; isn&#8217;t supported I&#8217;m running through all the form inputs on the page with a &#8220;required&#8221; attribute, adding a class of &#8220;required&#8221;, and the type of input (email, text, etc.). Setting the input type helps you use the validation plugin a little better and can also aid in styling for IE6.</p><p><strong>NOTE:</strong> I&#8217;m using JavaScript&#8217;s native getAttribute() method to grab the input type because  jQuery&#8217;s <code>attr('type')</code> returns &#8220;text&#8221; on the &#8220;email&#8221; input for some reason.</p><p>After all the appropriate classes are added, we can call the plugin. I&#8217;m doing it on each form, but targeting one specific form by it&#8217;s ID value is more traditional.</p><pre><code>(function ($) {

	<span>// check for "required" input support with modernizr</span>
	if (Modernizr.input.required) {

		<span>// do something else</span>

	} else {

		<span>// parse through each required input</span>
		$('form').find('input[required]').each(function () {

			<span>// add a class to each required field with "required" &#038; the input type</span>
			<span>// using the normal "getAttribute" method because jQuery's attr always returns "text"</span>
			$(this).attr('class', 'required ' + this.getAttribute('type')).removeAttr('required');

		});

		<span>// call jQuery validate plugin on each form</span>
		$('form').each(function () {
			$(this).validate();
		});

	}<span> // if required supported</span>

}(jQuery));</code></pre><p>Older (unsupported) browsers will use the Validation plugin, and modern browsers will use the built-in HTML 5 validation.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/required-input-fallback/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Setting up shortcuts in Terminal</title><link>http://www.csskarma.com/blog/shortcuts-in-terminal/</link> <comments>http://www.csskarma.com/blog/shortcuts-in-terminal/#comments</comments> <pubDate>Fri, 20 May 2011 12:33:01 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[terminal]]></category> <category><![CDATA[unix]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=907</guid> <description><![CDATA[Let me just start off my saying I hate using the command line. That being said, I&#8217;m all for making the experience tolerable with a few tweaks. Today I set up some aliases in Terminal so I don&#8217;t have to remember some of the weirder commands I use often. I thought I&#8217;d share the process [...]]]></description> <content:encoded><![CDATA[<p>Let me just start off my saying <strong>I hate using the command line</strong>.</p><p>That being said, I&#8217;m all for making the experience tolerable with a few tweaks. Today I set up some aliases in Terminal so I don&#8217;t have to remember some of the weirder commands I use often.</p><p>I thought I&#8217;d share the process for my fella command line haters / mac users.</p><h3>The process</h3><p>In your home directory, there&#8217;s a file name <tt>.profile</tt>. It&#8217;s hidden from the finder by default so you can get to it a few different ways:</p><ul><li>use a program that displays hidden files (like <a
href="http://www.macupdate.com/app/mac/26729/houdini">Houdini</a>)</li><li>Navigate to it through a text editor (I use <a
href="http://www.panic.com/coda/">coda</a>)</li><li>Open terminal and type <tt>cd ~</tt>, then press enter</li></ul><p>Once you find it, open the file, it&#8217;s probably blank. If you&#8217;re in terminal you&#8217;d type <tt>vi .profile</tt>, then <tt>i</tt> to being editing.</p><p>Alias syntax goes like this: &#8220;<tt>alias [alias name]='[really long normal command]'</tt>&#8221;</p><p>And you&#8217;d put one per line. For example, my .profile file currently looks like this:</p><pre><code>alias ..= 'cd ..'
alias ll='ls -al'
alias ls='ls -l'
alias home='cd ~</code></pre><p>So if I want to navigate to my home directory I type &#8220;home&#8221; rather than &#8220;cd ~&#8221;. A small addition (and actually the same character count), but as you use these more and more to customize your environment you&#8217;ll see how much time and frustration you can save.</p><p>Anyway, save that file, restart terminal, and you&#8217;re good to go.<br
/> If you&#8217;re doing all this in terminal first hit [esc] to exit edit mode, then type <tt>:wq</tt> to save your changes.</p><p>Hope that helps some folks, I know it helps me, and I like posting stuff like this if for nothing else but having a place I can remember to go to find it.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/shortcuts-in-terminal/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>CSS Performance and OOCSS</title><link>http://www.csskarma.com/blog/css-performance-and-oocss/</link> <comments>http://www.csskarma.com/blog/css-performance-and-oocss/#comments</comments> <pubDate>Mon, 18 Apr 2011 13:49:11 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[performance]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=896</guid> <description><![CDATA[I&#8217;m in the process right now of signing on for my first speaking gig in since I moved to Boston (thanks to @joedevon) and it got me thinking about performance in CSS; a topic I really haven&#8217;t address in years since I started using my single-line CSS formatting style. Tip: use spaces rather than tabbing [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m in the process right now of signing on for my first speaking gig in since I moved to Boston (thanks to <a
href="http://twitter.com/joedevon" rel="friend colleague">@joedevon</a>) and it got me thinking about performance in CSS; a topic I really haven&#8217;t address in years since I started using my <a
href="http://csskarma.com/css/csskarma.css" rel="me">single-line CSS formatting style</a>. <strong>Tip:</strong> use spaces rather than tabbing to maintain the alignment across different software since they all treat the &#8220;tab&#8221; differently.</p><p>But I digress.</p><h3>CSS Performance</h3><p>We&#8217;ve all seen the mass of articles &amp; tutorials about <a
href="http://www.youtube.com/watch?v=mHtdZgou0qU">JavaScript performance</a>, how to <a
href="http://www.alfajango.com/blog/the-difference-between-jquerys-bind-live-and-delegate/">optimize jQuery</a>, and the <a
href="http://jsperf.com/browse">JS Performance test suite</a>. The market is flooded, ok, we get it. JavaScript is a beast of the Web that needs to be constantly tamed. It&#8217;s getting better, especially with lightning-fast JS engine , <a
href="http://code.google.com/p/v8/">V8</a> looming around in Chome and NodeJS.</p><p>CSS performance is constantly overshadowed by JS performance (and rightly so), but that doesn&#8217;t mean we shouldn&#8217;t at least take a look at it every now-and-then as a form of checks and balances for our front-end code. After all, something like <a
href="http://developer.yahoo.com/performance/rules.html">90% of the load time for a site happens on the front-end</a> and unless you&#8217;re Google, it&#8217;s probably not <em>all</em> JavaScript (little bit of a big there, sorry fellas).</p><h3>OOCSS</h3><p>Object Oriented CSS goes a little like this:</p><h4>The CSS</h4><pre><code>.rounded{ border-radius:7px; }
.box-shadow{ -moz-box-shadow:0 2px 2px #333;box-shadow:0 2px 0 #333; }
.left{ float:left; }</code></pre><h4>The HTML</h4><pre><code>&lt;div class=&quot;rounded box-shadow left&quot;&gt;&lt;/div&gt; &lt;!--/.rounded .box-shadow .left--&gt;</code></pre><p>You&#8217;re basically just separating out the individual properties you&#8217;ll be using and modifying the HTML to reflect them. It&#8217;s very similar to a framework model in building and styling a site.</p><p>Whether you like it or not, there it is. There&#8217;s a lot of debate over this method, pluses and minuses, loves and hates. The most popular argument against it is that you&#8217;re embedding style information into your HTML and semi-collapses the progressive enhancement model of structure &mdash; presentation &mdash; behavior.</p><p>It&#8217;s tough for me to totally buy into OOCSS for that reason. I stick very closely to progressive enhancement while I&#8217;m building a site and really only stray from that when I&#8217;m styling for a CMS and I need classes like: &#8220;left&#8221;, &#8220;right&#8221;, &#8220;clear&#8221;, etc., which get applied by the user later on.</p><p>So, when styling for use in a CMS, I really do think OOCSS is dead-on. I&#8217;ve yet to fully use it just because I question it&#8217;s maintainability. But from a strictly performance stand point: <strong>Is OOCSS better?</strong> Yea, it&#8217;s better. <a
href="http://www.shauninman.com/archive/2008/05/05/css_qualified_selectors#comment_3940">It does perform better across the board</a> than almost all of the CSS selectors (especially the advanced ones).</p><h3>Lastly, on performance</h3><p>We can all go through ySlow and JSLint to see where we may have some front-end memory leaks but getting down to the granularity of the way we&#8217;re constructing a page (OOCSS vs. non-OOCSS) is tough without running the explicit performance tests.</p><p>As the Web gets more and more advanced and browsers like Chrome pave the way for faster sites, I have no idea what the real answer for CSS performance is, but I do know that <strong>browsers will not help you write better code</strong>. We still need to explore the best practices, be it front-end, back-end or somewhere in the middle.</p><p>I&#8217;d like to get into this in more detail, but I have a group of tourists screaming at eachother in French next to me (trying out a new coffee shop), so I defer to the comments if you&#8217;re at all interesting in the OOCSS debate.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/css-performance-and-oocss/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Our Curious Future with QR Codes</title><link>http://www.csskarma.com/blog/qr-codes/</link> <comments>http://www.csskarma.com/blog/qr-codes/#comments</comments> <pubDate>Thu, 02 Sep 2010 01:56:30 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[qr codes]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=841</guid> <description><![CDATA[Often, when I write something for CSSKarma I try and make it unique rather than picking up the hot topic and throwing my2cents in about it. You may have noticed the lack of HTML 5 posts, even though I spoke at the Penn UI Conference about it. There&#8217;s actually quite a bit buried in the [...]]]></description> <content:encoded><![CDATA[<p>Often, when I write something for CSSKarma I try and make it unique rather than picking up the hot topic and throwing my2cents in about it. You may have noticed the lack of HTML 5 posts, even though I <a
href="http://csskarma.com/presentations/penn">spoke at the Penn UI</a> Conference about it. There&#8217;s actually quite a bit buried in the <a
href="http://www.csskarma.com/lab">Lab</a> that will surface when I launch the new design.</p><p>Anyway, I&#8217;ve been playing around with QR codes lately. Seeing what sort of information can be stored in them, if they&#8217;re a viable technology for the masses, and if they&#8217;re worth investing in. I thought I&#8217;d share my findings.</p><h3>What is a QR code?</h3><p>A QR code is much like a bar code, but they look a lot cooler and in theory can contain a lot more, and a wider variety of information. Everything from plain text to contact information and URLs. They&#8217;re actually very robust and there&#8217;s a ton of cool stuff we can do if they ever actually catch on and reach the public.</p><p>Most modern phones will have an available app for decoding QR codes. I&#8217;m not sure about Blackberry, but I know Android, iPhone and Palm all have free apps.</p><h3>What can we use them for?</h3><p>QR codes can be used for all sorts of things. Anytime you want to transfer data, a QR code can be used. I&#8217;m sure there are some limitations on the amount of data, but I haven&#8217;t encountered it yet. Many times a URL is embedded into the code and then the user is sent out to the Web for more information. This is basically a shortcut to help you get to the data without having to type in a URL (it&#8217;s actually a pretty big time saver).</p><p>One of the best use-cases for QR codes I&#8217;ve seen has been attaching them to a venue. For example: If, on the side of a building, you found a QR code you could decode it to find a calendar of events going on in that building, then choose which ones to add to your calendar, set reminders, etc. All by simply taking a picture of a QR code. Again, a bit time saver.</p><p>Since the QR code can basically be an extension of the Web, the possibilities are endless. The problem is&#8230; how will we let people know they exist? It&#8217;s not a problem in the Web community, but based on the speed most technologies like this are adopted, it could be a while.</p><h3>Are they viable for the masses?</h3><p>This is always a debate with a &#8220;geek technology&#8221;. We can use them, they&#8217;re very helpful at conferences for passing contact information from person to person or the location of presentation slides. But will everyone else use them? Probably not.</p><p>Don&#8217;t get me wrong, they&#8217;re a great technology with endless uses, but I&#8217;m not sure they&#8217;re going to catch on in the way we&#8217;d like. They&#8217;re pretty strange, and no one really knows what they are. They have a along road ahead,  much like the way RSS quietly became popular. I think they&#8217;ll have the same fate in never really being a main stream technology, but stil very popular behind the scenes.</p><p>For some reason, these free technologies really struggle but the second Apple charges 99 cents, they take off like a rocket. Here&#8217;s hoping QR codes make the next Steve Jobs talk?</p><h3>Are they worth investing in?</h3><p>They are absolutely, 100% worth investing in. The upside of QR codes far outweighs the downside. The <a
href="http://www.csskarma.com/lab/qrcodes">QR Code Generator</a> I built took all of 2 hours to fully develop and launch. Most of that time was reading through the Google Charts documentation and testing out all the options.</p><p>I don&#8217;t see any reason we shouldn&#8217;t explore QR codes more, they have a very promising future and I look forward to see what we can make happen, especially when combined with RDFa, Microformats , and some of the new HTML 5 data embedding.</p><h4>The upside</h4><p>Everyone loves it, you&#8217;re a genius and you get piles of money handed to you on a daily basis for doing something innovative.</p><h4>The downside</h4><p>Most people many not get it, so they get the information the &#8220;old fashion way&#8221;. The worst-case scenario is that it totally fails and you wasted 2 hours. It&#8217;s very much like progressive enhancement for real-life.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/qr-codes/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Sliding Labels Official Plugin Release [ver. 3.2]</title><link>http://www.csskarma.com/blog/sliding-labels-plugin/</link> <comments>http://www.csskarma.com/blog/sliding-labels-plugin/#comments</comments> <pubDate>Tue, 29 Jun 2010 12:27:23 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[form]]></category> <category><![CDATA[javascipt]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[ui]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=805</guid> <description><![CDATA[View Demo Plugin Minified Plugin Version: 3.2 – Added a &#8220;className&#8221; option so you don&#8217;t have to use &#8220;.slider&#8221; as the wrapper Version 3.1: Changed &#8220;children&#8221; to &#8220;find&#8221; so it will work with a UL. Thanks to Oro for the feedback Version 3 of Sliding Labels brought some big changes, the largest being that I [...]]]></description> <content:encoded><![CDATA[<div
id="slidinglabels-plugin-release"><ul
class="demo"><li><a
href="http://www.csskarma.com/lab/plugin_slidinglabels/">View Demo</a></li><li><a
href="http://www.csskarma.com/lab/jquery.plugins/jquery.slidinglabels.js">Plugin</a></li><li><a
href="http://www.csskarma.com/lab/jquery.plugins/jquery.slidinglabels.min.js">Minified Plugin</a></li></ul><p><strong>Version: 3.2 – Added a &#8220;className&#8221; option so you don&#8217;t have to use &#8220;.slider&#8221; as the wrapper</strong></p><p>Version 3.1: Changed &#8220;children&#8221; to &#8220;find&#8221; so it will work with a UL. Thanks to <a
href="http://www.csskarma.com/blog/sliding-labels-plugin/comment-page-1/#comment-85490">Oro</a> for the feedback</p><p>Version 3 of Sliding Labels brought some big changes, the largest being that I finally converted it into a working jQuery plugin.</p><p>Maybe it was the 200 e-mails requesting an official plugin, maybe it was my curiosity. Whatever it was, I heard everyone and I wanted to let you know that I&#8217;m listening to all the feature requests and bug reports; and I really do appreciate them.</p><h3>Additions to version 3</h3><p><strong>Plugin status</strong>: Obviously creating an official plugin was the biggest change</p><p><strong>Position: relative</strong>: It seemed like a lot of the questions I was getting had to do with adding <code>position:relative</code> to the .slider element in the CSS, so I just moved that into the script.</p><p><strong>Animation speed</strong>: I added an option to easily control the animation speed. It can take strings like &#8220;fast&#8221; and &#8220;slow&#8221; or any numeric value.</p><p><strong>Axis option</strong>: I got a lot of requests to add in some functionality to have the label slide up rather than only to the left. I added this in with an &#8220;axis&#8221; variable which can take either &#8220;x&#8221; or &#8220;y&#8221; for sliding direction</p><h3>Subtractions to version 3</h3><p><strong>Label Color</strong>: Originally I had this in the script so it looked nicer inline to the field, but I got to thinking that this really should be defined in the CSS, and it&#8217;s just color; so I took it out.</p><h3>Using the plugin</h3><p>Just like the previous version, you need an element wrapping the <code>&lt;label&gt;</code> and <code>&lt;input&gt;</code> elements. I use a <code>&lt;div&gt;</code> in the demo, but you can use whatever you&#8217;d like. The only requirement is that it have the class name &#8220;slider&#8221;. I can change that if anyone finds it to be annoying, but <strong>let me know and I&#8217;ll update the script</strong></p><h4>HTML</h4><pre><code>
&lt;div class="form-slider"&gt;
&lt;label for="user"&gt;User name&lt;/label&gt;
&lt;input type="text" id="user" name="user"&gt;
&lt;/div&gt;</code></pre><h4>JavaScript</h4><pre><code>
$(function(){ $('#contactform').slidinglabels({
/* these are all optional */
className : 'form-slider', // the class you're wrapping the label &amp; input with -&gt; default = slider
topPosition : '5px', // how far down you want each label to start
leftPosition : '5px', // how far left you want each label to start
axis : 'x', // can take 'x' or 'y' for slide direction
speed : 'fast' // can take 'fast', 'slow', or a numeric value
});
});</code></pre><p>That&#8217;s all there is to it. Let me know what you think, any extra features you&#8217;d like and any bugs. I should be submitting this to <a
href="http://jquery.com">jQuery.com</a> in the next few days.</p></div> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/sliding-labels-plugin/feed/</wfw:commentRss> <slash:comments>61</slash:comments> </item> <item><title>Redirection Options</title><link>http://www.csskarma.com/blog/redirection-options/</link> <comments>http://www.csskarma.com/blog/redirection-options/#comments</comments> <pubDate>Wed, 27 Jan 2010 15:40:58 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[beginner]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[meta]]></category> <category><![CDATA[php]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=736</guid> <description><![CDATA[Lately, I&#8217;ve been having to work with a lot of redirects and I was going through different redirection options with a client. So I thought I would do a quick write up about the different types of redirection. I also haven&#8217;t seen a collection of these in one place, so I thought I would put [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/blog/wp-content/uploads/banner_redirection.png" alt="article banner"></p><p>Lately, I&#8217;ve been having to work with a lot of redirects and I was going through different redirection options with a client. So I thought I would do a quick write up about the <strong>different types of redirection</strong>.</p><p>I also haven&#8217;t seen a collection of these in one place, so I thought I would put this together.</p><p>There are a few different types that are commonly use when redirecting users:</p><ul><li>.htaccess / apache</li><li>php header</li><li>javascript</li><li>meta refresh</li></ul><p>The top two are the one&#8217;s you&#8217;ll be using most often, I don&#8217;t really recommend the last two. But they <em>are</em> available, so I think they&#8217;re worth noting. So here they are in the order I would recommend:</p><h3>.htaccess / apache redirects</h3><pre><code>Redirect /old_directory http://example.com/newdirectory</code></pre><p>This redirection is most efficient at the apache level, but if you&#8217;re like me and are on shared hosting, getting into the apache installation probably isn&#8217;t an option. In that case you can put this in an <a
href="http://www.csskarma.com/blog/creating-an-htaccess-template/">.htaccess file</a> in the root directory of your site.</p><p>Using an .htaccess redirection is great for moving entire sites because you can not only redirect a page, but you can redirect entire sites and subdirectories with one line of code.</p><h3>PHP header redirects</h3><pre><code>&lt;?php header('Location: http://example.com/newdirectory/'); ?&gt;</code></pre><p>PHP header redirects are good for single page redirects and if you&#8217;re not comfortable working with the .htaccess file. This code goes at the very top of the page you&#8217;re trying to redirect. If it&#8217;s not there you may get a &#8220;headers already sent&#8221; error.</p><p>If you&#8217;re publishing out static HTML files, you can still use this by adding this code into your .htaccess file:</p><pre><code>AddType application/x-httpd-php .php .html .htm</code></pre><p>This will let you <strong>execute PHP in an HTML file</strong>.</p><h3>JavaScript redirects</h3><pre><code>&lt;script type="text/javascript"&gt;
&lt;!--
window.location = "http://example.com/newdirectory"
//--&gt;
&lt;/script&gt;</code></pre><p>JavaScript redirects are generally not used unless you&#8217;ve exhausted the other two options. If you don&#8217;t have access to the .htaccess file AND you can&#8217;t run server-side script on your page, this is an OK fallback option, but you have to make sure to provide a link to the forwarding page incase a user is browsing without JavaScript.</p><h3>Meta redirects</h3><pre><code>&lt;meta http-equiv="refresh" content="0;URL=http://example.com/newdirectory"&gt;</code></pre><p>As your last option, I don&#8217;t see this in the wild anymore, but it&#8217;s worth mentioning that it does exist and does technically work (I&#8217;m not sure about it&#8217;s validity in HTML 5). You would place this in the document HEAD with the rest of the meta elements.</p><p>content=0 is a second timer for the redirect, I have this one set to 0 so it will redirect immediately.</p><p><strong>Those are the options I&#8217;ve used in the past; did I miss anything? Maybe an ASP redirect? Let me know!</strong></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/redirection-options/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>What You Need to Know About Behavioral CSS</title><link>http://www.csskarma.com/blog/behavioral-css/</link> <comments>http://www.csskarma.com/blog/behavioral-css/#comments</comments> <pubDate>Mon, 21 Dec 2009 16:46:32 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[article]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[smashing magazine]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=681</guid> <description><![CDATA[Hi all, I had a new article published over the weekend at Smashing Magazine. Check it out and let me know what you think! Behavioral CSS I wrote it quite a while ago and it seems to be showing a bit in the comments, but overall, I&#8217;m pretty happy with the way it came out [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/blog/wp-content/uploads/smashing-banner1.png" alt="" title="smashing-banner" class="article-banner"/></p><p>Hi all,<br
/> I had a new article published over the weekend at Smashing Magazine. Check it out and let me know what you think!</p><p><a
href="http://www.smashingmagazine.com/2009/12/19/what-you-need-to-know-about-behavioral-css/">Behavioral CSS</a></p><p>I wrote it quite a while ago and it seems to be showing a bit in the comments, but overall, I&#8217;m pretty happy with the way it came out and the reader responses it&#8217;s getting. Hope you enjoy <a
href="http://www.smashingmagazine.com/2009/12/19/what-you-need-to-know-about-behavioral-css/">Behavioral CSS</a></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/behavioral-css/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CSS Techniques I Wish I Knew When I Started Designing Websites</title><link>http://www.csskarma.com/blog/css-techniques-i-wish-i-knew-when-i-started-designing-websites/</link> <comments>http://www.csskarma.com/blog/css-techniques-i-wish-i-knew-when-i-started-designing-websites/#comments</comments> <pubDate>Fri, 18 Dec 2009 15:30:42 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[article]]></category> <category><![CDATA[noupe]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=675</guid> <description><![CDATA[I know I haven&#8217;t posted in a while, but I wanted to stop by and let everyone know that I have a new article out on Noupe.com called &#8220;CSS Techniques I Wish I Knew When I Started Designing Websites&#8221; It was pretty fun to write trying to think back to my beginnings in the Web [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/blog/wp-content/uploads/noupeheader.png" alt="noupeheader" title="noupeheader" width="580" height="176" class="article-banner" /></p><p>I know I haven&#8217;t posted in a while, but I wanted to stop by and let everyone know that I have a new article out on <a
href="http://www.noupe.com/css/css-techniques-i-wish-i-knew-when-i-started-designing-websites.html">Noupe.com</a> called &#8220;<a
href="http://www.noupe.com/css/css-techniques-i-wish-i-knew-when-i-started-designing-websites.html">CSS Techniques I Wish I Knew When I Started Designing Websites</a>&#8221;</p><p>It was pretty fun to write trying to think back to my beginnings in the Web and sort of relive that frustration. I tried to include something for beginners and some for the more advanced users, so hopefully everyone will be able to take something away from the article.</p><p>Let me know what you think!</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/css-techniques-i-wish-i-knew-when-i-started-designing-websites/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 5/15 queries in 0.030 seconds using disk: basic

Served from: www.csskarma.com @ 2012-02-04 04:14:02 -->
