﻿<?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>Meena, Inc. Web Design</title>
	<atom:link href="http://web.meenainc.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.meenainc.com</link>
	<description>Small Business Web Design &#124; Atlanta Web Development</description>
	<lastBuildDate>Wed, 06 Jan 2010 13:35:18 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Filtering Blocks v2</title>
		<link>http://css-tricks.com/filtering-blocks-v2/</link>
		<comments>http://css-tricks.com/filtering-blocks-v2/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 13:35:18 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5235</guid>
		<description><![CDATA[This is an update to the first version of filtering blocks I did a while back. The idea is that you have a long list or large set of &#8220;blocks&#8221; on the page. Each block belongs to a certain group. There is navigation on the page for viewing all of them at once, or selecting [...]]]></description>
			<content:encoded><![CDATA[<p>This is an update to the <a href="http://css-tricks.com/filtering-blocks/">first version</a> of filtering blocks I did a while back. The idea is that you have a long list or large set of &#8220;blocks&#8221; on the page. Each block belongs to a certain group. There is navigation on the page for viewing all of them at once, or selecting which group you would like to see. Selecting a particular group hides the blocks from any other group, hence &#8220;filtering&#8221;.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/filterblocks2.png" width="570" height="358" alt="" title="" /></p>
<p>&nbsp;</p>
<p><a href="http://css-tricks.com/examples/FilteringBlocks2/" class="button">View Demo</a> &nbsp; <a href="http://css-tricks.com/examples/FilteringBlocks2.zip" class="button">Download Files</a></p>
<p>&nbsp;</p>
<p><span id="more-5235"></span></p>
<h3>HTML</h3>
<p>Each block has class names applied to it for the groups it belongs to. Here are two examples. The both belong to the group &#8220;all&#8221;, the top one &#8220;adv&#8221; and the bottom one &#8220;cla&#8221;.</p>
<pre><code class="html">&lt;div class="all adv"&gt;
&lt;img src="images/flavor-curry.jpg" alt="" /&gt;
&lt;h4&gt;Sweet Curry With Saffron&lt;/h4&gt;
&lt;p&gt;Lusciously mellow with notes of overripe berries, 55% Hawaiian dark chocolate meets its soulmate in sweet curry - awash in spices including coriander, tumeric, cumin and cardamom and sprinkled with rare saffron. This spicy melange is slowly steeped in fresh coconut puree and gently blended with the chocolate. The taste rushes over you in waves - fragrant curry, chased by coconut, then the lingering, raisiny sweetness of chocolate. Available in &lt;a href="/store/products/Chocolatier_s_Choice-5-2.html"&gt;Chocolatier's Choice&lt;/a&gt; and &lt;a href="/store/products/Adventurous_Collection-3-2.html"&gt;Adventurous Collection&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;

&lt;div class="all cla"&gt;
&lt;img src="images/flavor-vanilla.jpg" alt="" /&gt;
&lt;h4&gt;Lucille's Vanilla &lt;/h4&gt;
&lt;p&gt;For those who prefer milder chocolate, this winsome truffle will ignite a lifelong love affair. Gail uses a dark blend in this recipe handed down through four generations of the Guittard family of chocolate makers. It tastes like a rich spoonful of homemade chocolate pudding - just like Gail's mom, Lucille, made on the stovetop in their family farm's kitchen. Available in &lt;a href="/store/products/Chocolatier_s_Choice-5-2.html"&gt;Chocolatier's Choice&lt;/a&gt; and &lt;a href="http://gailambrosius.com/store/products/Classic_Collection-2-2.html"&gt;Classic Collection&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</code></pre>
<p>Then the navigation includes REL attributes that reference those classes:</p>
<pre><code class="html">&lt;div id="flavor-nav"&gt;
    &lt;a rel="all" class="current"&gt;All&lt;/a&gt;
    &lt;a rel="cla"&gt;Classic&lt;/a&gt;
    &lt;a rel="adv"&gt;Adventurous&lt;/a&gt;
    &lt;a rel="tea"&gt;Tea-Inspired&lt;/a&gt;
&lt;/div&gt;</code></pre>
<h3>jQuery JavaScript</h3>
<p>The plan in plain English:</p>
<ol>
<li>When a link in the filtering navigation is clicked&#8230;</li>
<li>Fade down all blocks (visual indication something is changing)</li>
<li>Remove &#8220;current&#8221; class from all navigation and apply it to newly clicked navigation</li>
<li>Figure out which group should be showing from the REL attribute</li>
<li>Any flavor NOT a part of the group, slide up</li>
<li>Any flavor that IS a part of the group, slide down</li>
<li>Fade back up all blocks</li>
</ol>
<pre><code class="javascript">$(function() {

	var newSelection = "";

	$("#flavor-nav a").click(function(){

	    $("#all-flavors").fadeTo(200, 0.10);

		$("#flavor-nav a").removeClass("current");
		$(this).addClass("current");

		newSelection = $(this).attr("rel");

		$(".flavor").not("."+newSelection).slideUp();
		$("."+newSelection).slideDown();

	    $("#all-flavors").fadeTo(600, 1);

	});

});</code></pre>
<p>This leads to a smoother experience than we had in version 1. Primarily because of the use of the .not() native jQuery filter. Before, we just &#8220;slid up&#8221; all the flavors and then &#8220;slid down&#8221; the correct ones. That means that every single flavor went through animation on every single navigation change. But that isn&#8217;t always necessary. For example if you are viewing one sub-set, then click back to &#8220;all&#8221;, those currently showing blocks don&#8217;t need to be animated, just all the other ones need to grow out. This solves that.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=Hj2ZYIjiVDM:7SPDyohdBJA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Hj2ZYIjiVDM:7SPDyohdBJA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Hj2ZYIjiVDM:7SPDyohdBJA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Hj2ZYIjiVDM:7SPDyohdBJA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Hj2ZYIjiVDM:7SPDyohdBJA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Hj2ZYIjiVDM:7SPDyohdBJA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Hj2ZYIjiVDM:7SPDyohdBJA:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/filtering-blocks-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Domain iframe Resizing</title>
		<link>http://css-tricks.com/cross-domain-iframe-resizing/</link>
		<comments>http://css-tricks.com/cross-domain-iframe-resizing/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:08:05 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5210</guid>
		<description><![CDATA[&#60;iframe&#62;&#8217;s which display content from different domains have security measures in place to prevent all sorts of stuff. For example, you can&#8217;t have JavaScript access anything inside it. It can be very frustrating, for example, if you just want to do something normal and white-hat like adjust the height of the iframe to fit the [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;iframe&gt;&#8217;s which display content from different domains have security measures in place to prevent all sorts of stuff. For example, you can&#8217;t have JavaScript access anything inside it. It can be very frustrating, for example, if you just want to do something normal and white-hat like adjust the height of the iframe to fit the content inside it. These security measures are in place to prevent all the black-hat kind of things you could do if you <strong>did</strong> have JavaScript access to the innards of an iframe.</p>
<p>I&#8217;ve literally tried to work on different solutions for this for <em>years</em> and always came up short. I recently came across a <a href="http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx">solution from Kazi Manzur Rashid</a> (about two years old now) that looks pretty solid so I thought I&#8217;d try it out. The results are the closest I&#8217;ve been able to come yet:</p>
<p>&nbsp;</p>
<p><a href="http://css-tricks.com/examples/iFrameResize/crossdomain.php" class="button">View Demo</a><br />
Warning: the demo kinda freaks out WebKit browsers like Safari and Chrome, see issues below.</p>
<p><span id="more-5210"></span></p>
<h3>To those who have come before&#8230;</h3>
<p>To do this with an iframe with source content on the same domain, you can <a href="http://css-tricks.com/snippets/jquery/fit-iframe-to-content/">do this</a>. Same-domain iframes aren&#8217;t subject to the same restrictions so it&#8217;s far easier.</p>
<p>Adam Fortuna explored some options using kind of a <a href="http://adamfortuna.com/2009/09/30/resize-a-crossdomain-iframe/">man-in-the-middle idea</a>. This may have been inspired by a <a href="http://blog.johnmckerrell.com/2006/10/22/resizing-iframes-across-domains/">technique by John McKerrell</a>.</p>
<p>The following technique doesn&#8217;t require the middle man thing though, which is why it&#8217;s closer to ideal.</p>
<h3>Prereqs</h3>
<p>This solution presupposes that you have control over both the hosting site and the source site. You&#8217;ll need to run JavaScript on both ends. So this isn&#8217;t going to work for an iframe of google.com.</p>
<h3>The Big Idea</h3>
<p>The work-around is using hash tags in the URL to relay information back and forth. This circumvents the security restrictions. It is unlikely that this will ever break, so it&#8217;s not really a &#8220;hack&#8221;. You can&#8217;t really do anything malicious with just a hash tag. In our case we&#8217;re just reading in that information and using it to do the resizing.</p>
<h3>The HOST Domain</h3>
<p>Actually has the iframe on it:</p>
<pre><code class="html">&lt;iframe id="frame-one" scrolling="no" frameborder="0" src="http://digwp.com/examples/iFrameSource/source.html" onload="FrameManager.registerFrame(this)"&gt;&lt;/iframe&gt;</code></pre>
<p>The iframe has an onload event on it, which calls a function from the FrameManager class, which we&#8217;ll need to call in the &lt;head&gt;:</p>
<pre><code class="html">&lt;script type="text/javascript" src="js/FrameManager.js"&gt;&lt;/script&gt;</code></pre>
<p>And here is the magical FrameManager class:</p>
<pre><code class="javascript">var FrameManager = {

    currentFrameId : '',
    currentFrameHeight : 0,
    lastFrameId : '',
    lastFrameHeight : 0,
    resizeTimerId : null,

    init: function() {

        if (FrameManager.resizeTimerId == null) {

            FrameManager.resizeTimerId = window.setInterval(FrameManager.resizeFrames, 500);

        }

    },

    resizeFrames: function() {

        FrameManager.retrieveFrameIdAndHeight();

        if ((FrameManager.currentFrameId != FrameManager.lastFrameId) || (FrameManager.currentFrameHeight != FrameManager.lastFrameHeight)) {

            var iframe = document.getElementById(FrameManager.currentFrameId.toString());

            if (iframe == null) return;

            iframe.style.height = FrameManager.currentFrameHeight.toString() + "px";

            FrameManager.lastFrameId = FrameManager.currentFrameId;
            FrameManager.lastFrameHeight = FrameManager.currentFrameHeight;
            window.location.hash = '';

        }

    },

    retrieveFrameIdAndHeight: function() {

        if (window.location.hash.length == 0) return;

        var hashValue = window.location.hash.substring(1);

        if ((hashValue == null) || (hashValue.length == 0)) return;

        var pairs = hashValue.split('&amp;');

        if ((pairs != null) &amp;&amp; (pairs.length &gt; 0)) {

            for(var i = 0; i &lt; pairs.length; i++) {

                var pair = pairs[i].split('=');

                if ((pair != null) &amp;&amp; (pair.length &gt; 0)) {

                    if (pair[0] == 'frameId') {

                        if ((pair[1] != null) &amp;&amp; (pair[1].length &gt; 0)) {

                            FrameManager.currentFrameId = pair[1];
                        }
                    } else if (pair[0] == 'height') {

                        var height = parseInt(pair[1]);

                        if (!isNaN(height)) {

                            FrameManager.currentFrameHeight = height;
                            FrameManager.currentFrameHeight += 15;

                        }
                    }
                }
            }
        }

    },

    registerFrame: function(frame) {

        var currentLocation = location.href;
        var hashIndex = currentLocation.indexOf('#');

        if (hashIndex &gt; -1) {

            currentLocation = currentLocation.substring(0, hashIndex);
        }

        frame.contentWindow.location = frame.src + '?frameId=' + frame.id + '#' + currentLocation;

    }
};

window.setTimeout(FrameManager.init, 300);</code></pre>
<h3>The SOURCE site</h3>
<p>The source content could pretty much be anything, located on a different server. Perhaps:</p>
<pre><code class="html">&lt;body&gt;

    &lt;div id="content"&gt;
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce in tortor sit amet sem luctus ornare. Nam sed augue id erat commodo gravida. Nulla in pede. Nunc sed elit non pede aliquam eleifend. Cras varius. Sed non lorem eget ipsum accumsan suscipit. Donec bibendum enim. Phasellus a ligula. Fusce turpis diam, ultricies at, ullamcorper a, consectetuer et, mauris. Pellentesque neque felis, scelerisque non, vestibulum at, luctus quis, velit. Quisque sit amet mi sed sem facilisis ornare. In leo ante, hendrerit nec, lobortis eget, feugiat ac, orci.
    &lt;/div&gt;

&lt;/body&gt;</code></pre>
<p>The most important thing we do on the source site is run some JavaScript to &#8220;publish&#8221; the height of itself. In my demo, I&#8217;m also throwing some jQuery in there to do some font-size animation so that the source content grows taller and shorter. </p>
<pre><code class="javascript">&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="frame.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;

    window.onload = function(event) {
        window.setInterval(publishHeight, 300);
    }

    $(function() {

        var $content = $("#content");

        function toggleFontSize() {

            if ($content.css("font-size") == "22px") {
                $("#content").animate({
                    fontSize: "15px"
                });
            } else {
                $("#content").animate({
                    fontSize: "22px"
                });
            }

        }

        var int = setInterval(toggleFontSize, 5000);

    });
&lt;/script&gt;</code></pre>
<p>So we are calling publishHeight() every 300 milliseconds. Here is that function, and it&#8217;s rag-tag gang of fellow supporting functions from the frame.js file.</p>
<pre><code class="javascript">function publishHeight() {

    if (window.location.hash.length == 0) return;

    var frameId = getFrameId();

    if (frameId == '') return;

    var actualHeight = getBodyHeight();
    var currentHeight = getViewPortHeight();

    if  (Math.abs(actualHeight - currentHeight) &gt; 15) {
        var hostUrl = window.location.hash.substring(1);

        hostUrl += "#";
        hostUrl += 'frameId=' + frameId;
        hostUrl += '&amp;';
        hostUrl += 'height=' + actualHeight.toString();

        window.top.location = hostUrl;
    }
}

function getFrameId() {

    var qs = parseQueryString(window.location.href);
    var frameId = qs["frameId"];

    var hashIndex = frameId.indexOf('#');

    if (hashIndex &gt; -1) {
        frameId = frameId.substring(0, hashIndex);
    }

    return frameId;

}

function getBodyHeight() {

    var height,
        scrollHeight,
        offsetHeight;

    if (document.height) {

        height = document.height;

    } else if (document.body) {

        if (document.body.scrollHeight) {
            height = scrollHeight = document.body.scrollHeight;
        }

        if (document.body.offsetHeight) {
            height = offsetHeight = document.body.offsetHeight;
        }

        if (scrollHeight &amp;&amp; offsetHeight) {
            height = Math.max(scrollHeight, offsetHeight);
        }
    }

    return height;
}

function getViewPortHeight() {

    var height = 0;

    if (window.innerHeight) {
        height = window.innerHeight - 18;
    } else if ((document.documentElement) &amp;&amp; (document.documentElement.clientHeight)) {
        height = document.documentElement.clientHeight;
    } else if ((document.body) &amp;&amp; (document.body.clientHeight)) {
        height = document.body.clientHeight;
    }

    return height;

}

function parseQueryString(url) {

    url = new String(url);

    var queryStringValues = new Object(),
        querystring = url.substring((url.indexOf('?') + 1), url.length),
        querystringSplit = querystring.split('&amp;');

    for (i = 0; i &lt; querystringSplit.length; i++) {
        var pair = querystringSplit[i].split('='),
            name = pair[0],
            value = pair[1];

        queryStringValues[name] = value;
    }

    return queryStringValues;

}</code></pre>
<h3>Issues</h3>
<ul>
<li><strong>Refresh happy in WebKit.</strong> Apparently it used to be Firefox that got all refresh happy, but apparently with the latest version it is flip flopped. Watch out of visiting the demo in Safari or Chrome, it&#8217;s a little choppy. <strong>If anyone has any ideas here, this is probably the biggest problem.</strong></li>
<li><strong>Messes up back button.</strong> Because of all the hash tags flying around on the host page, it may screw up the back button functionality on that page.</li>
<li><strong>Intervals, intervals, intervals.</strong> There are a lot of intervals flying around here which are nearly always hacky-red-flags. The quicker the intervals, the smoother but more resource intensive. The slower, the more choppy but easier. Either way, sucky.</li>
<li><strong>Limit of information sent via hash.</strong> If you were thinking about using this technique to send other information, because it happens via URL, you are limited by the amount of information that can pass. Presumably the same as a GET request&#8230; around 1k.</li>
</ul>
<h3>The holy grail</h3>
<p>I think the reason I&#8217;m so obsessed with this because <a href="http://wufoo.com">Wufoo</a> forms seem to handle this so perfectly. Wufoo forms used to only be embeddable with iframes. I always had to set the height of them literally almost 50% taller than the content itself to accommodate for the innards growing when the form was submitted with errors (the error messaging expanded the height). If I didn&#8217;t, the submit button would get cut off making the form un-submittable. </p>
<p>Wufoo now has a JavaScript embed option, but ultimately the form still comes in via iframe. However they do it, the iframe can magically resize itself as needed. I have no idea how it&#8217;s done, but I imagine it something somewhat similar to what we are doing here. Because Wufoo has access to both the host page and the source page. My best guess is that the JavaScript on the host page can send requests back to the source page which can somehow accurately tell the host page what height it should be. </p>
<h3>Got better?</h3>
<p>It&#8217;s a lot of code, but hey, it works (again, thanks for <a href="http://geekswithblogs.net/rashid/archive/2007/01/13/103518.aspx">Kazi</a> for the smarts). Got better? Please, share.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=ZmevmHuBq38:0DyYy1cgHoU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=ZmevmHuBq38:0DyYy1cgHoU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=ZmevmHuBq38:0DyYy1cgHoU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=ZmevmHuBq38:0DyYy1cgHoU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=ZmevmHuBq38:0DyYy1cgHoU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=ZmevmHuBq38:0DyYy1cgHoU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=ZmevmHuBq38:0DyYy1cgHoU:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/cross-domain-iframe-resizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Web Advertising</title>
		<link>http://css-tricks.com/on-web-advertising/</link>
		<comments>http://css-tricks.com/on-web-advertising/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:10:45 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5220</guid>
		<description><![CDATA[On this week&#8217;s screencast I talk about online advertising. What it is, how it works, and mostly, my opinions about it. I thought I&#8217;d recap here and touch on some things I forgot about.

Content Websites vs. Product/Service Websites
There are some websites that spend their time building content. They build it to keep visitors coming back [...]]]></description>
			<content:encoded><![CDATA[<p>On <a href="http://css-tricks.com/video-screencasts/78-on-web-advertising/">this week&#8217;s screencast</a> I talk about online advertising. What it is, how it works, and mostly, my opinions about it. I thought I&#8217;d recap here and touch on some things I forgot about.</p>
<p><span id="more-5220"></span></p>
<h3>Content Websites vs. Product/Service Websites</h3>
<p>There are some websites that spend their time building content. They build it to keep visitors coming back because it&#8217;s funny or interesting or important or otherwise compelling. Content websites, by and large, are free to visit and consume. Creators of content website spend considerable time and effort creating and maintaining the site and it&#8217;s content.</p>
<p>Some websites exist to support a product or service that is for sale. The creators of these sites spend the majority of their time and effort working on that product or service. Making it better, improving features, etc. They aren&#8217;t working on building content, that&#8217;s not their forte.</p>
<p>Content websites get the traffic (but need money). Product/service websites make the money (but need traffic). Advertising is a way to trade and share some love back and forth.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/adtrade.png" width="570" height="200" alt="" title="" /></p>
<h3>Not Evil</h3>
<p>There is nothing &#8220;evil&#8221; about advertising. Creating content takes blood, sweat and tears. Creating products takes blood, sweat, and tears. Both deserve to be paid for that. Advertising makes sure they do.</p>
<p>Advertising can certainly be overdone though. Having to watch a 30 second video before reading an article&#8230; I feel that&#8217;s too much. A page-peel that you come within 100 pixel of and it comes down and covers half the page? Too much.</p>
<h3>Except when it is</h3>
<p>The &#8220;evil&#8221; stuff only starts entering the picture when websites start do things under the table.  Selling emails/spam, that&#8217;s clearly evil. Writing an article about how great a book is, without ever reading it, so you can link to it with an Amazon affiliate code, is evil. Filling a page with bullshit keyword-strewn content in hopes to get some search traffic and covering the page in ads, is evil.</p>
<p>Honest websites creating honest content displaying ads for honest companies creating honest products, that&#8217;s always OK. When any one of those things loses the &#8220;honest&#8221; part, that&#8217;s problematic.</p>
<h3>Services</h3>
<p>On this site, I use <a href="http://buysellads.com">BuySellAds</a>. They specialize in the design website community, which means that they have a base of advertisers with products and services that cater to this community. That&#8217;s awesome, as it means that ads on this site will be filled with things that web designers might be interested in. They take 25% of sales, a hefty fee at a glance, but completely worth it when I consider that I spend almost no time at all thinking about advertising. I can use that time building content instead. Otherwise I&#8217;d be spending my time finding/communicating with advertisers, invoicing them, keeping track of live dates, flipping in and out graphics, etc. And because BSA comes in over JavaScript, it keeps paid links away from Google bots which frown upon that. Also great about the BSA model, advertisers pay for what they get. They look at ad spots, they see what kind of impressions the site has, they see a fixed monthly price, and they make the call. It&#8217;s as straight-forward as it could be.</p>
<p>A much more popular advertising service on a global scale is <a href="http://google.com/adsense/">Google AdSense</a>. AdSense reads the content on the page it resides upon and serves up advertising relevant to that content. In general, I think that&#8217;s great. Relevant ads benefit publishers (more people click them), advertisers (the people clicking are a targeted audience), and the users themselves (they find something they are actually looking for). On my site, I don&#8217;t need it, since I already have a service that is targetted. But it&#8217;s great for something like <a href="http://ning.com">Ning.com</a>, where people can build their own social network for free. Someone starts a knitting site, content on the site is about knitting, there are Google ads on the site about knitting, everybody wins. Forums are also good targets for AdSense, since topics are set by your visitors themselves, and the ads can mimic those topics. Personally, I don&#8217;t like Google ads. I think they are ugly. I think people know exactly what they look like and know how to avoid them. I think it attracts lots of crappy advertisers. Most of all, I don&#8217;t like how it pays via clicks.</p>
<p>There is one place on CSS-Tricks that uses them, and that is next to the search results. I love <a href="http://www.google.com/cse/">Google Custom Search Engines</a>. It does a great job in searching this site. I tied my AdSense account to the CSE so that I earn from the clicks on the ads in search. It amounts to a few dollars a month. The reason I do it is because it costs $100 to remove them and I don&#8217;t really think it&#8217;s worth it. They sit harmlessly over to the right which would be blank white space anyway.</p>
<h4>The cool kid club</h4>
<p>There are a couple of ad serving services in the <a href="http://meenainc.com/services/design-development/">web design</a> niche that are exclusively for the cool kids: <a href="http://decknetwork.net/">The Deck</a> and <a href="http://fusionads.net/">Fusion Ads</a>. They are pretty great. Publishers using these services display <strong>only one ad per page</strong>. The ads are typically very well designed and classy. I like this idea very much. Unfortunately you have to be a lot cooler than you or me to get in on it. I also tend to think that sites serving these ads aren&#8217;t <strong>primarily</strong> concerned with advertising income. While I&#8217;m sure they pay fairly well, I&#8217;m betting one high paying ad can&#8217;t beat 9 medium paying ads. </p>
<h3>Affiliates</h3>
<p>Affiliate programs are another form of online advertising. Product/service sites tend to love them, as they only have to pay out when successful sales are made. In traditional advertising, they have to pay no matter what and if the ad does poorly, it&#8217;s a loss for them. If an affiliate ad does poorly, it&#8217;s a loss for the publisher.</p>
<p>I like the idea of affiliate programs. If someone goes through the trouble of spreading the word and sending in sales, they deserve to be paid for that work. </p>
<p>I&#8217;m also wary of them. I think the advertiser gets a pretty significant advantage. Advertising isn&#8217;t just direct sales, it&#8217;s brand exposure and mind share as well. The advertiser gets this part for free, as well as only paying for direct sales.</p>
<p>I think if you become an affiliate for anything, you should do it because you like what you are selling and you think you&#8217;ll sell enough of it to turn the balance in your favor.</p>
<p>I have affiliate programs both for <a href="http://aremysitesup.com/affiliates/new">Are My Sites Up</a> and <a href="http://digwp.com/book/affiliate/">Digging Into WordPress</a>. I like how they have worked out.</p>
<h3>Common sizes</h3>
<p>I have no idea what these sizes are based on or what the history is, but the Interactive Advertising Bureau <a href="http://www.iab.net/iab_products_and_industry_services/1421/1443/1452">offers up this list</a> (based on what is &#8220;commonly sold&#8221; in the marketplace). They say that the goal is to provide some standardization to reduce stuff like having different publishers using sizes only trivially different like 300&#215;95, 300&#215;100, 300&#215;105 etc., which is a damn fine goal.</p>
<table style="width: 100%" id="ad-table" cellpadding="10">
<tbody>
<tr>
<th> </th>
<th>Recommend Max File Size</th>
<th>Recommended  Animation Length</th>
</tr>
<tr>
<td>300 x 250 Medium Rectangle</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>250 x 250 Square Pop-Up</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>240 x 400 Vertical Rectangle</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>336 x 280 Large Rectangle</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>180 x 150 Rectangle</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>300&#215;100 3:1 Rectangle</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>720&#215;300 Pop-Under</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td width="247">468 x 60 Full Banner</td>
<td align="middle" width="80">40k</td>
<td align="middle" width="80">:15</td>
</tr>
<tr>
<td>234 x 60 Half Banner</td>
<td align="middle">30k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>88 x 31 Micro Bar</td>
<td align="middle">10k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>120 x 90 Button 1</td>
<td align="middle">20k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>120 x 60 Button 2</td>
<td align="middle">20k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>120 x 240 Vertical Banner</td>
<td align="middle">30k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>125 x 125 Square Button</td>
<td align="middle">30k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>728 x 90 Leaderboard</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>160 x 600 Wide Skyscraper</td>
<td align="middle" width="80">40k</td>
<td align="middle" width="80">:15</td>
</tr>
<tr>
<td>120 x 600 Skyscraper</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
<tr>
<td>300 x 600 Half Page Ad</td>
<td align="middle">40k</td>
<td align="middle">:15</td>
</tr>
</tbody>
</table>
<p>Personally I think the sizes are rather asinine &#8211; with one ad size having nearly no relationship to the next. Standards are great, and of course it will be hard to fight against the stream now, but I think this whole &#8220;common sizes&#8221; business needs a re-think.</p>
<h3>Randomization</h3>
<p>If you offer a number of similar sized ad blocks in one area, the fair thing to do for the advertisers is randomize their position within the block. I&#8217;ll post a snippet of how to do this soon.</p>
<h3>A/B Testing</h3>
<p>You may not have the ability to always do this if you are using an ad service, but a good idea in web advertising is to use A/B testing. That is, have two versions of the same ad and measure which one does better, everything else being equal. Randomly display each one, and add different tracking information to the end of the URL that each links to. If you are using Google Analytics, you could use their <a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&#038;answer=55578">link builder</a>.</p>
<h3>When to start</h3>
<p>A classic problem of online advertising is deciding how to approach it on a brand new site. There are some pretty different schools of thought. </p>
<p>Some people say you should wait to put ads on a site until it has grown up enough that it&#8217;s &#8220;worth it&#8221;. I can buy into that. You are going to make pennies when launching a brand new site with no audience. Your ads aren&#8217;t worth anything, so why put them there? It also preoccupies you with thinking about advertising when clearly the most important thing for a fledgling site is growing that audience and traffic.</p>
<p>The flip side is putting ads on a site from day one. Even though they aren&#8217;t worth anything, at least you are ready, in the design/layout of the site for when they are worth something. It also sets up user expectations on the site. If you build an audience on a site with zero ads, then one day fill the site with ads, that&#8217;s rocking the boat quite a bit. Users might not take kindly to that. Having ads from the beginning sets expectations straight from the beginning.</p>
<p>For the sake of offering advice, I&#8217;d say if you think your site will have advertising on it eventually, plan for it design-wise and throw some placeholder ads up for now (perhaps display ads for your friends sites?). Then once you&#8217;ve grown enough (perhaps 50k pageviews a month) then start working on paid ads.</p>
<p>&nbsp;</p>
<p>Feel free to chime in with your own thoughts about online advertising!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=Qm2pJaJqnIg:AA7y65vGPNg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Qm2pJaJqnIg:AA7y65vGPNg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Qm2pJaJqnIg:AA7y65vGPNg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Qm2pJaJqnIg:AA7y65vGPNg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Qm2pJaJqnIg:AA7y65vGPNg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Qm2pJaJqnIg:AA7y65vGPNg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Qm2pJaJqnIg:AA7y65vGPNg:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/on-web-advertising/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Page Résumé Site</title>
		<link>http://css-tricks.com/one-page-resume-site/</link>
		<comments>http://css-tricks.com/one-page-resume-site/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 14:17:00 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5191</guid>
		<description><![CDATA[A friend of mine recently sent me her résumé to look over. I&#8217;m definitely not a professional job hunter but I think in these situations any extra set of eyes can help fine tune the final product. As it was, the résumé was a Microsoft Word document, which in itself is fine, but it wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine recently sent me her résumé to look over. I&#8217;m definitely not a professional job hunter but I think in these situations any extra set of eyes can help fine tune the final product. As it was, the résumé was a Microsoft Word document, which in itself is fine, but it wasn&#8217;t particularly well designed. I thought, we&#8217;re going on 2010 here, we might as well take this thing to the web!</p>
<p>I created a really simple design. Then I replaced all her content with good ol&#8217; C&#8217;thulu so I have a generic template I can give out to you folks.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/onepageresume.jpg" width="570" height="406" alt="" title="" /></p>
<p><a href="http://css-tricks.com/examples/OnePageResume/" class="button">View Demo</a> &nbsp; <a href="http://css-tricks.com/examples/OnePageResume.zip" class="button">Download Files</a></p>
<p><span id="more-5191"></span></p>
<p>Really nothing to amazing here, just a clean layout. But also:</p>
<ul>
<li>Contact information using microformats</li>
<li>Main resume area using what I think is the semantically correct definition list (&lt;dl&gt;)</li>
<li>Literally one page (just an index.html file, with optional images)</li>
<li>Prints nicely</li>
</ul>
<h3>Print Preview</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/printresume.jpg" width="570" height="349" alt="" title="" /></p>
<p>Of course feel free to do whatever you want with it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=gQZPlqVDkek:-3FKbm1sQD8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=gQZPlqVDkek:-3FKbm1sQD8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=gQZPlqVDkek:-3FKbm1sQD8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=gQZPlqVDkek:-3FKbm1sQD8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=gQZPlqVDkek:-3FKbm1sQD8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=gQZPlqVDkek:-3FKbm1sQD8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=gQZPlqVDkek:-3FKbm1sQD8:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/one-page-resume-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seeing The Details</title>
		<link>http://css-tricks.com/seeing-details/</link>
		<comments>http://css-tricks.com/seeing-details/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 13:17:15 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5153</guid>
		<description><![CDATA[When a great musician hears a great song, what do they hear? I am not a great musician so I can only speculate. I would guess that they listen for the emotion behind the song. Great songs are great because of their delivery of honest emotion, in any genre. I also think they listen for [...]]]></description>
			<content:encoded><![CDATA[<p>When a great musician hears a great song, what do they hear? I am not a great musician so I can only speculate. I would guess that they listen for the <em>emotion</em> behind the song. Great songs are great because of their delivery of honest emotion, in any genre. I also think they listen for the intangibles. They try and put their fingers on the elusive qualities and little details that make a great song great. </p>
<p>I think this is very similar to how great designers see great designs.</p>
<p><span id="more-5153"></span></p>
<p>But let&#8217;s get back to the musician for a second.</p>
<p>To an outsider observing this great musician analyzing a great song, they might <em>oooh-and-ahhh</em> at their ability to quickly dissect the key, melody, or chord changes. But to the musician, these things likely feel trivial. That is no problem for them. That is their trade. Of course they know what key it&#8217;s in. What is more important is that emotion, that atmosphere, those little details that took the song to greatness.</p>
<p>Now what about a great designer looking at a great design? I think the designer looks for the same things the musician does. The emotion. The details. I think they try to put their finger on the sometimes elusive qualities that make a great design great. The outside observer watching this designer break down the design might <em>oooh-and-ahhh</em> at the designers ability to replicate it, or analyze the technology used to make it happen. But the designer likely feels those things are trivial. Of course they can replicate it. Of course they can figure out the fancy CSS tricks or Photoshop effects that made it happen. That is their trade. More importantly though, is the designers ability to understand the details that took the design to greatness.</p>
<p>&nbsp;</p>
<p>Do you think this is true? Or is perhaps the opposite true? Great creators are great because of their ability to see their creations as an untrained layperson would.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=o3RbEc7ht-4:ejcj56K6mg4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o3RbEc7ht-4:ejcj56K6mg4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o3RbEc7ht-4:ejcj56K6mg4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o3RbEc7ht-4:ejcj56K6mg4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o3RbEc7ht-4:ejcj56K6mg4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o3RbEc7ht-4:ejcj56K6mg4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o3RbEc7ht-4:ejcj56K6mg4:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/seeing-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digging Into Wordpress – in Print!</title>
		<link>http://css-tricks.com/diw-in-print/</link>
		<comments>http://css-tricks.com/diw-in-print/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 13:12:28 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5166</guid>
		<description><![CDATA[The print version of Digging Into WordPress the book is now available here. It&#8217;s been an awesome journey, taking this from idea to final product and having 100% control over everything. That is a story for another post, for now let&#8217;s take a look at the book!


How much is it?
It&#8217;s $67, and automatically comes with [...]]]></description>
			<content:encoded><![CDATA[<p>The print version of Digging Into WordPress the book is <a href="http://digwp.com/book/">now available here</a>. It&#8217;s been an awesome journey, taking this from idea to final product and having 100% control over everything. That is a story for another post, for now let&#8217;s take a look at the book!</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/bookcover.jpg" width="570" height="380" alt="" title="" /></p>
<p><span id="more-5166"></span></p>
<h3>How much is it?</h3>
<p>It&#8217;s $67, and automatically comes with the PDF version (more on that later). We realize that is toward the high end of the scale. There are a variety of reasons for this.</p>
<ul>
<li>This is 400 pages of <strong>full-color</strong> printing.</li>
<li>We aren&#8217;t printing in massive quantities. In printing, the less you run the more you pay per-piece.</li>
<li>It has been a ton of work getting this all together. Aside from some very helpful folks who helped us find errors after the PDF went out, every inch of it has been done by myself, Jeff, or our friends and family. We don&#8217;t have the efficiency of a company that does this day in and day out.</li>
</ul>
<p>Believe me, our margins are fairly tight on this.</p>
<p><strong>We are shipping internationally.</strong> But as you might suspect, it costs a good bit more. I asked the post office for the cheapest possible way to get it overseas, and places like the United Kingdom and Germany were around $28, so that&#8217;s what we need to charge. </p>
<p>In the United States, shipping is closer to $5.00. Illinois sales are subject to sales tax; international sales get VAT.</p>
<h3>Already have the PDF?</h3>
<p>First things first, as promised, if you already purchased the PDF and want a print copy of the book, you are entitled to a discount. Here is what you do:</p>
<ol>
<li><strong>Email us at sales@digwp.com</strong> (or use the <a href="http://digwp.com/contact/">contact form</a>). Either forward us your receipt or just provide us with the full name and email used when buying the book.</li>
<li>We&#8217;ll send you a <strong>discount code</strong> you can use during checkout.</li>
<li>The code will be valued at whatever you paid for the book plus $5 off. So if you paid the full $27 for the PDF, we&#8217;ll send you a code worth $32. So you&#8217;ll end up paying $35. This helps us keep our margins intact and not lose money on these print books.</li>
</ol>
<h3>Features</h3>
<p>My favorite&#8230; it&#8217;s <strong>spiral bound!</strong> For once, a tech book that will <strong>lay flat</strong> next to your keyboard.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/laysflat.jpg" width="570" height="380" alt="" title="" /></p>
<p>Every page is full color!</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/fullcolor.jpg" width="570" height="380" alt="" title="" /></p>
<p>And of course the <a href="http://digwp.com/book/learn-more/">slew of stuff</a> we talk about. Perhaps most importantly, <strong>free updates to the PDF version for life</strong>. We already have plans in the works for updates. As a buyer, you&#8217;ll be emailed a free download link when those new versions go out.</p>
<h3>How it affects the affiliate program</h3>
<p>Our affiliate program for the book pays (a rocking) 50% for sales of the PDF. That part doesn&#8217;t change. But we obviously can&#8217;t afford to pay 50% for book sales. For book sales we are going to give 20%. What that works out to is basically the same exact payout for either purchase: $13.50 for a PDF sale, $13.40 for a book sale. Pretty damn good if you ask me. I&#8217;ve literally PayPal&#8217;d out <strong>thousands</strong> of dollars to affiliates.</p>
<h3>Much love</h3>
<p>Look at my family hard at work! </p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/familybook.jpg" width="570" height="760" alt="" title="" /></p>
<p>&#8230; and in case you missed it at the top, it&#8217;s <a href="http://digwp.com/book/">available here</a>. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=Q_0eWT7CsoE:vkBdvDYIp1U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Q_0eWT7CsoE:vkBdvDYIp1U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Q_0eWT7CsoE:vkBdvDYIp1U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Q_0eWT7CsoE:vkBdvDYIp1U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Q_0eWT7CsoE:vkBdvDYIp1U:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=Q_0eWT7CsoE:vkBdvDYIp1U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=Q_0eWT7CsoE:vkBdvDYIp1U:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/diw-in-print/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic IMDb / Netflix / Amazon Movie Links</title>
		<link>http://css-tricks.com/automatic-movie-links/</link>
		<comments>http://css-tricks.com/automatic-movie-links/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 13:58:01 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5158</guid>
		<description><![CDATA[In this article we'll look at a way to automatically create and insert links that link out to the popular movie-based sites (or sections) Netflix, Amazon, and IMBb. We'll use jQuery JavaScript for this, so that this happens on the fly using soley the name of the movie, reducing what would be a tedious chore of manually collecting all these links into just a few lines of code.]]></description>
			<content:encoded><![CDATA[<p>A while back on my personal blog I made up a <a href="http://chriscoyier.net/2009/10/25/list-of-post-apocalyptic-movies/">list of all post-apocalyptic movies</a>. It is just a reference guide for myself to keep track of which ones I have seen and haven&#8217;t seen, but the page could be handy for others that are also into the subgenre. To make the list actually useful, there needed to be some links to take action on the movies. I figured three would be good:</p>
<ul>
<li><strong>Amazon:</strong> to buy the movie</li>
<li><strong>Netflix:</strong> to add it to your queue</li>
<li><strong>IMDB:</strong> to learn more about the movie</li>
</ul>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/linksformovies2.png" width="570" height="290" alt="" title="" /></p>
<p>One way to add these links to each movie in the list would have been to go to those websites, find the movie, and copy and paste the link. But boy that&#8217;s a lot of grunt work for dozens and dozens of movies. There must be a better way.</p>
<p><span id="more-5158"></span></p>
<p>Fortunately for us, each of these websites offers a search page that accepts URL parameters. We can simply insert the name of the movie into a specially formatted URL, and then append links to our page with JavaScript.</p>
<p>The formats are like this:</p>
<pre><code class="html">http://www.amazon.com/s/ref=nb_ss_d?tag=chriscoyier-20&amp;url=search-alias%3Ddvd&amp;field-keywords=MOVIE-TITLE-HERE</code></pre>
<pre><code class="html">http://www.netflix.com/Search?lnkctr=srchrd-ips&amp;v1=MOVIE-TITLE-HERE</code></pre>
<pre><code class="html">http://www.imdb.com/find?s=tt&amp;q=MOVIE-TITLE-HERE</code></pre>
<p>Notice the Amazon one has my Affiliate ID in there. Might as well eh?</p>
<h3>Automatic insertion</h3>
<p>In my article, I used a table to lay out the movie list. After all, it&#8217;s tabular data. In my table I left the last table in each row empty. With JavaScript we are going to</p>
<ol>
<li>Loop through each row</li>
<li>Find the movie title</li>
<li>Construct the URLs based on the movie title</li>
<li>Create the links</li>
<li>Append the links to the last empty table row</li>
</ol>
<pre><code class="javascript">&lt;script type="text/javascript" charset="utf-8"&gt;

  var movieText = '';

  $(function() {

	$("#movie-list tr td:first-child").each(function() {

		movieText = $(this).find("strong").text();

		netflixURL = "http://www.netflix.com/Search?lnkctr=srchrd-ips&amp;v1=" + movieText;
		amazonURL = "http://www.amazon.com/s/ref=nb_ss_d?tag=chriscoyier-20&amp;url=search-alias%3Ddvd&amp;field-keywords=" + movieText;
		imdbURL = "http://www.imdb.com/find?s=tt&amp;q=" + movieText;

		$(this).parent().find("td:last-child").empty().append("&lt;a class='out-link netflix-link' href='"+netflixURL+"'&gt;Netflix Link&lt;/a&gt;&lt;a class='out-link amazon-link' href='"+amazonURL+"'&gt;Amazon Link&lt;/a&gt;&lt;a class='out-link imdb-link' href='"+imdbURL+"'&gt;IMDb Link&lt;/a&gt;");

	});

  });

&lt;/script&gt;</code></pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=iBfeuSEpGi0:Eh3KKCQTeyw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=iBfeuSEpGi0:Eh3KKCQTeyw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=iBfeuSEpGi0:Eh3KKCQTeyw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=iBfeuSEpGi0:Eh3KKCQTeyw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=iBfeuSEpGi0:Eh3KKCQTeyw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=iBfeuSEpGi0:Eh3KKCQTeyw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=iBfeuSEpGi0:Eh3KKCQTeyw:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/automatic-movie-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-product Quantity-based Order Form</title>
		<link>http://css-tricks.com/multi-product-quantity-based-order-form/</link>
		<comments>http://css-tricks.com/multi-product-quantity-based-order-form/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 13:15:57 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5094</guid>
		<description><![CDATA[The point of this form is that users enter quantities for different products and the math is done automatically updating all the different totals: quantity total, subtotal, shipping total, and final total. Monetary formatting is kept intact with some helper functions. Foxycart is integrated to show how it might work in the "real" world.]]></description>
			<content:encoded><![CDATA[<p>This is just basically version 2 of the ordering form I did up in <a href="http://css-tricks.com/video-screencasts/50-building-a-customized-and-dynamic-ordering-form/">screencast 50</a> about a year ago. The same client was reactivating it for another period and I took the opportunity to rewrite some of how it works to make it better. Numbers are entered, math is performed automatically, the people rejoice.</p>
<p>&nbsp;</p>
<p><a href="http://css-tricks.com/examples/DynamicOrderForm/" class="button">View Demo</a> &nbsp; <a href="http://css-tricks.com/examples/DynamicOrderForm.zip" class="button">Download Files</a></p>
<p>&nbsp;</p>
<p><span id="more-5094"></span></p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/OrderFormDemo.png" width="570" height="410" alt="" title="" /></p>
<h3>What does it do?</h3>
<p>The main point here is the <strong>math</strong>. It&#8217;s a simple table of products, and each product has an input box for quantity. Changing the value of that quantity box automatically triggers the math and totals are calculated. Row totals are calculated across, then order totals are calculated down. Quantities are totaled and multiplied by a shipping rate and all that is added together. </p>
<p>For demonstration purposes, the form is integrated with <a href="http://foxycart.com">FoxyCart</a>, to show how it might be used in a &#8220;real&#8221; situation.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/FoxyCartCart.png" width="570" height="274" alt="" title="" /></p>
<h3>Improvements over last time</h3>
<ul>
<li>Some of the functions are more efficient.</li>
<li>Number formatting is far better. Instead of having a box that just says 12423 in it, it says $12,423. This is thanks to some fun snippetry <a href="http://css-tricks.com/snippets/javascript/comma-values-in-numbers/">like this</a>.</li>
<li>Event handling is smarter. Instead of waiting for the input&#8217;s blur event to fire, the math is performed on focus, blur, change, and keyup events, making the form seem smarter and snappier.</li>
<li>Logic in general is better, handling bad inputs in a cleaner way.</li>
</ul>
<p>If ya&#8217;ll have ideas to make it even better, I&#8217;m all ears as always.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=vSdzQrLSyQQ:pCC3_CskP2Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=vSdzQrLSyQQ:pCC3_CskP2Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=vSdzQrLSyQQ:pCC3_CskP2Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=vSdzQrLSyQQ:pCC3_CskP2Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=vSdzQrLSyQQ:pCC3_CskP2Y:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=vSdzQrLSyQQ:pCC3_CskP2Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=vSdzQrLSyQQ:pCC3_CskP2Y:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/multi-product-quantity-based-order-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design v5</title>
		<link>http://css-tricks.com/design-v5/</link>
		<comments>http://css-tricks.com/design-v5/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:26:45 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5131</guid>
		<description><![CDATA[I've been tinkering with this redesign maybe a month or two, and decided to push it out last night. I had been using it myself thanks to the Theme Switch plugin, but there was a few things I had to actually go live before I could change, so I just did it. As usual, it's not an absolute overhaul, more of a refresher.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been tinkering with this redesign maybe a month or two, and decided to push it out last night. I had been using it myself thanks to the <a href="http://wordpress.org/extend/plugins/nkthemeswitch/">Theme Switch</a> plugin, but there was a few things I had to actually go live before I could change, so I just did it. As usual, it&#8217;s not an absolute overhaul, more of a refresher. I&#8217;m calling this v5 because apparently I called the last one v4 and let&#8217;s just roll with that. (Locally, it&#8217;s my 12th version!)</p>
<p><span id="more-5131"></span></p>
<h3>Reasons</h3>
<ul>
<li><strong>Reign in the font situation.</strong> I wanted to establish the &#8220;CSS-Tricks&#8221; type part of the logo in a font that I liked and was a part of a larger family. I went with <a href="http://typography.com/fonts/font_inside.php?wipID=21&#038;productLineID=100008">Gotham Condensed</a>, which I picked up just for this, to extend my collection of the Gotham family, which should serve me well for a long time to come. Headers on the site are in FF Tisa Web Pro, served through <a href="http://typekit.com">TypeKit</a>. Body copy is Verdana. Other than ads, which I cannot control, those are the only 3 typefaces in use on the site, which was the goal. (Well, the code in Monaco, but that doesn&#8217;t count.)</li>
<li><strong>Feature more of the site on the homepage.</strong> The homepage now also includes the latest 5 snippets and the latest video screencast, in addition to the the latest 5 posts.</li>
<li><strong>No more dark sidebar. </strong>The #1 complaint of the last design was the really dark sidebar which visually overpowered the content area. I eventually started to buy into that criticism so I wanted to make the sidebar less intense that way. The outsides of the site is now &#8220;framed&#8221; as well, which makes me feel more comfortable, instead of the all-white-no-edges middle that was going on before.</li>
<p><strong>Not do anything too crazy.</strong> This is just a refresher. No major new areas. No navigational changes. No different URL&#8217;s&#8230; This is the same ol&#8217; joint it used to be
</ul>
<h3>Considerations</h3>
<ul>
<li><strong>Maintain or increase the value of the advertising.</strong> There isn&#8217;t any more or less than the last design, but things were shuffled around a little. I like the placements better. They have more breathing room. </li>
<li>Dropping IE 6. Unfortunately I kind of half-assed IE 6 support in the last one. This time I just didn&#8217;t want to deal with it. I&#8217;m fine with supporting IE 6 on client sites and eCommerce sites and whatnot, but that demographic on this site is tiny and I just don&#8217;t care. For IE 6, I&#8217;m serving the <a href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css">Universal IE 6 CSS</a>.</li>
<li>TypeKit fonts kinda look like shit on Windows, so I&#8217;m only serving up TypeKit for non IE browsers. This doesn&#8217;t solve the problem of Windows+NonIE browsers, but we&#8217;ll see what kind of feedback there is on that.</li>
</ul>
<h3>To Do</h3>
<ul>
<li>Update my bookshelf area</li>
<li>New footer for the forums</li>
<li>Re-think the increasingly-important Archives page</li>
<li>Add a few tweaks, mainly regaring search, in an additional IE 6 stylesheet</li>
<li>Ideally, go through the entire video archive and redo nicer thumbnails and put them in my new system (just an internal thing, I&#8217;m using custom fields for everything now and supporting two different systems until I can go back over this).</li>
<li>See if I can get it with no horizontal scroll at 1024px. I planned for this and then something went funny somewhere. I need to track down what the thing is that is sticking out and try and bring it in.</li>
<li>Keep on tweakin&#8217; &#8212; I have some little micro-ideas already I need to get to.</li>
</ul>
<h3>For Posterity</h3>
<h4>Old</h4>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/posterity-v4.jpg" width="570" height="407" alt="" title="" /></p>
<h4>New</h4>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/posterity-v5.jpg" width="570" height="388" alt="" title="" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=dakwjAAwsnI:pmzbEJSDjlE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=dakwjAAwsnI:pmzbEJSDjlE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=dakwjAAwsnI:pmzbEJSDjlE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=dakwjAAwsnI:pmzbEJSDjlE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=dakwjAAwsnI:pmzbEJSDjlE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=dakwjAAwsnI:pmzbEJSDjlE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=dakwjAAwsnI:pmzbEJSDjlE:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/design-v5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aborting Links, Cross Browser Comparisons</title>
		<link>http://css-tricks.com/aborting-links/</link>
		<comments>http://css-tricks.com/aborting-links/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 13:26:28 +0000</pubDate>
		<dc:creator>Chris Coyier</dc:creator>
				<category><![CDATA[Meena Inc.]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://css-tricks.com/?p=5096</guid>
		<description><![CDATA[The situation: you click down on a link and you suddenly realize you didn&#8217;t want to click that link. So before you release the mouse button, you move the cursor away from the link.
This is what I am calling &#8220;aborting&#8221; a link. Years ago now, I remember seeing somebody&#8217;s demo where they found some weird [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The situation:</strong> you click down on a link and you suddenly realize you didn&#8217;t want to click that link. So before you release the mouse button, you move the cursor away from the link.</p>
<p>This is what I am calling &#8220;aborting&#8221; a link. Years ago now, I remember seeing somebody&#8217;s demo where they found some weird combination of CSS which made it so you couldn&#8217;t abort from a link. It&#8217;s been on my to-research list for a long time, and I just started to get around to it. I wasn&#8217;t able to dig anything up, or find much written about it elsewhere. I have a feeling that it was more of a weird old browser bug, and not something easily replicate-able in the modern browsers I am using now. </p>
<p>This idea of aborting links is pretty interesting though. As it turns out, different browsers have pretty different ways of handling it. Let&#8217;s take a look. </p>
<p><span id="more-5096"></span></p>
<h3>Firefox 3.5.6</h3>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-firefox.png" width="570" height="149" alt="" title="" /></p>
<p>In Firefox, you can click anywhere inside the link and you have about a 5-pixel dragging radius before the link is aborted. </p>
<h3>Safari 4.0.4</h3>
<p>In Safari, if you click <em>off the text</em>, you can drag anywhere within the link and the link will not abort. You have to release the mouse actually outside the link for it to abort. </p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-safari.png" width="570" height="149" alt="" title="" /></p>
<p>If you click on the text, you have about a 40-pixel radius before the link will be aborted, showing you a small link-popup.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-safari2.png" width="570" height="149" alt="" title="" /></p>
<h3>Chrome 4.0.249.30</h3>
<p>No matter where you click in Chrome, you have about a 40-pixel drag radius before the link is aborted.</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-chrome.png" width="570" height="149" alt="" title="" /></p>
<h3>Opera 10.10</h3>
<p>In Opera, if you click and drag <em>left or right, or even diagonally</em>, the link will not abort until you leave the confines of the link. But if you drag <em>up or down</em>, your link will abort in about a 5 pixels. This is for clicking off the text itself.</p>
<p>If you click on the text, you have about a 5-pixel radius before the link will abort. Left or right dragging will actually select text, which is unusual (in other browsers you have to click outside the link and drag around to get a text selection).</p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-opera.png" width="570" height="149" alt="" title="" /></p>
<h3>IE 8.0.6</h3>
<p>IE has a consistent 5-pixel radius to abort no matter where you click. </p>
<p><img src="http://css-tricks.com/wp-content/csstricks-uploads/abort-ie.png" width="570" height="149" alt="" title="" /></p>
<h3>So?</h3>
<p>So &#8211; nothing. It&#8217;s just kind of interesting how different browsers, even browsers that use the same rendering engine, handle aborting links differently. This is definitely something they thought about while creating the browser, and all came to different conclusions on how it should be handled. </p>
<p>This concept applies to anything with a click or touch surface. For example, the iPhone allows you to abort the pressing of an icon / link, but simply moving your finger away from that area.</p>
<p>For the record, the demo page used in this research <a href="http://css-tricks.com/examples/LinkEscaping/">is here</a>.</p>
<h3>If you wanted to be a real bastard&#8230;</h3>
<p>It is important the links are able to be aborted. It&#8217;s just common courtesy, to allow someone to back up out of a mistake before it happens.  However if you really had a good reason why you needed a link to be unabortable (or you were a real bastard), you could redirect the page with JavaScript on the mouseDown event. Here is some jQuery:</p>
<pre><code class="javascript">$(function() {

    $("a").mousedown(function() {
        window.location = $(this).attr("href");
    });

});</code></pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/CssTricks?a=o39GaCdymQI:6CnSIir7A7w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/CssTricks?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o39GaCdymQI:6CnSIir7A7w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o39GaCdymQI:6CnSIir7A7w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o39GaCdymQI:6CnSIir7A7w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o39GaCdymQI:6CnSIir7A7w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/CssTricks?a=o39GaCdymQI:6CnSIir7A7w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/CssTricks?i=o39GaCdymQI:6CnSIir7A7w:D7DqB2pKExk" border="0"></img></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://css-tricks.com/aborting-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
