<?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>Now Direction</title>
	<atom:link href="http://nowdirection.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nowdirection.com</link>
	<description>Online Publishing Precision</description>
	<lastBuildDate>Mon, 26 Jul 2010 18:31:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Seed Tweets</title>
		<link>http://nowdirection.com/2010/07/seed-tweets/</link>
		<comments>http://nowdirection.com/2010/07/seed-tweets/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 02:24:51 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=696</guid>
		<description><![CDATA[

^ Surreal sprouted thrush

While converting a blog into a moderation site for a client&#8217;s Twitter API, it was apparent that we needed at least one initial Tweet. And we will need one Tweet for every content bucket that the client wants to track. And the idea of a &#8220;seed tweet&#8221; was born! 
So do we [...]]]></description>
			<content:encoded><![CDATA[<div class="alignright">
<a href="http://nowdirection.com/wp-content/uploads/2010/07/original_seed_tweet.png"><img  src="http://nowdirection.com/wp-content/uploads/2010/07/original_seed_tweet-266x490.png" alt="original_seed_tweet" title="original_seed_tweet" width="266" height="490" class="aligncenter size-large wp-image-697" /></a></p>
<h6>^ Surreal sprouted <a href="http://en.wikipedia.org/wiki/Bluebird" target="_blank" title="About Bluebirds">thrush</a></h6>
</div>
<p>While converting a blog into a moderation site for a client&#8217;s Twitter API, it was apparent that we needed at least one initial Tweet. And we will need one Tweet for every content bucket that the client wants to track. And the idea of a &#8220;seed tweet&#8221; was born! </p>
<p>So do we call it a <strong>seet</strong>, a <strong>tweed</strong>, a <strong>sweet</strong>? Or any variation with &#8220;ts&#8221; and &#8220;dt&#8221; like <strong>seedts</strong>, <strong>tweedts</strong>, <strong>sweedts</strong>?</p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/07/seed-tweets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caution: Cut &amp; Paste Can Create Invisible Non-Breaking Spaces</title>
		<link>http://nowdirection.com/2010/06/caution-cut-paste-can-create-invisible-non-breaking-spaces/</link>
		<comments>http://nowdirection.com/2010/06/caution-cut-paste-can-create-invisible-non-breaking-spaces/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 15:55:41 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=681</guid>
		<description><![CDATA["Be Careful what you paste" or<br /> "How I learned about the Option+Space on Mac" or <br />"Firefox? Again?"]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s what happened:<br />
HTML code from Visual Studio was pasted into Skype on Windows. I received the HTML code message and copied it from Skype into Coda on Mac. I went about my business. </p>
<p>The login Element we&#8217;re working on somehow got extra top &amp; bottom padding. An hour of CSS into removing this, I said, &#8220;Maybe it&#8217;s a Visual Studio thing.&#8221; So I stripped all the classes and IDs down to just the bare HTML element tags. <em>Padding still there.</em><br />
Odd, it&#8217;s not inheriting anything in the CSS, but I can select it? This is moving from annoying to frustrating.<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/06/can-select-as-text-but-do-not-appear-in-source-as-content.png"><img src="http://nowdirection.com/wp-content/uploads/2010/06/can-select-as-text-but-do-not-appear-in-source-as-content-342x490.png" alt="can-select-as-text-but-do-not-appear-in-source-as-content" title="can-select-as-text-but-do-not-appear-in-source-as-content" width="342" height="490" class="aligncenter size-large wp-image-685" /></a></p>
<h6>^ First clue: it behaves as content, but it&#8217;s not in the source code.</h6>
<h3>Okay, then; we&#8217;re going to have to do this the old fashioned way.</h3>
<p>I started deleting whole sections of code, refreshing and seeing if that made any difference. I would undo the delete (thus restoring the wonky white-space characters) and delete even more code. <em>STILL THERE!</em><br />
<a href="http://nowdirection.com/wp-content/uploads/2010/06/deleted-code.png"><img src="http://nowdirection.com/wp-content/uploads/2010/06/deleted-code.png" alt="deleted-code" title="deleted-code" width="340" height="86" class="aligncenter size-full wp-image-686" /></a></p>
<h6>^ Wonky white-space remained.</h6>
<p>Then I saw it. Apparently, Firebug doesn&#8217;t show these hidden white-space characters outside of properly nested div tags. When all of the tags were finally gone, and there was only a line of white-space between the opening &amp; closing DIV tags, and they were the only content, THEN they finally appeared.<br />
They manifested themselves as <strong>&amp;nbsp;</strong> characters in the HTML!<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/06/appear-if-only-content-in-div.png"><img src="http://nowdirection.com/wp-content/uploads/2010/06/appear-if-only-content-in-div.png" alt="appear-if-only-content-in-div" title="appear-if-only-content-in-div" width="417" height="389" class="aligncenter size-full wp-image-684" /></a></p>
<h6>^ Now appearing: Hidden characters!</h6>
<p>I went back and examined at the hidden characters. They looked like subscript carrot, or like one wave of a spell-check squiggle.<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/06/unicode-non-breaking-spaces-in-coda.png"><img src="http://nowdirection.com/wp-content/uploads/2010/06/unicode-non-breaking-spaces-in-coda-485x490.png" alt="unicode-non-breaking-spaces-in-coda" title="unicode-non-breaking-spaces-in-coda" width="485" height="490" class="aligncenter size-large wp-image-682" /></a></p>
<h6>^ Hindsight: 20/20.</h6>
<p>Two things:</p>
<ol>
<li><strong>Viewing the source</strong> doesn&#8217;t help. They are invisible even in firebug.</li>
<li>Someone is taking liberties. The OS? Firefox? Not sure.</li>
</ol>
<p><a href="http://nowdirection.com/wp-content/uploads/2010/06/nbsp-invisible-in-source-but-not-in-firebug.png"><img src="http://nowdirection.com/wp-content/uploads/2010/06/nbsp-invisible-in-source-but-not-in-firebug-490x347.png" alt="nbsp-invisible-in-source-but-not-in-firebug" title="nbsp-invisible-in-source-but-not-in-firebug" width="490" height="347" class="aligncenter size-large wp-image-683" /></a></p>
<h6>^ Invisible in the source code, but only appear in Firebug if they are a leaf node of the DOM (final descendant).</h6>
<p>The programs are all doing what they&#8217;re supposed to be doing. Same with the operating systems. I pasted from email, pdf or other desktop-published documents into Coda many times before. And the results seemed to be just plain ASCII text. So this came as a bit of a surprise. Now I know it&#8217;s Unicode, and am all the wiser. </p>
<p>I have no  excuse for Firefox&#8217;s interpretation of these characters. Anyone care to weigh-in on this behavior?</p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/06/caution-cut-paste-can-create-invisible-non-breaking-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>@font-face.com Rolls Over</title>
		<link>http://nowdirection.com/2010/05/font-face-com-rolls-over/</link>
		<comments>http://nowdirection.com/2010/05/font-face-com-rolls-over/#comments</comments>
		<pubDate>Fri, 21 May 2010 16:10:34 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=665</guid>
		<description><![CDATA[A promising web fonts service was aborted today. I received this notice in my inbox:
font-face update
Our Google Announcement
Google have recently announced that they are also entering the web-font market &#8211; with the same free, hosted model as ours.
Although we have put 100&#8217;s of hours into the design, development and readying of 150+ fonts (x4 formats [...]]]></description>
			<content:encoded><![CDATA[<p>A promising web fonts service was aborted today. I received this notice in my inbox:</p>
<blockquote><p><strong>font-face update</strong><br />
<strong>Our Google Announcement</strong><br />
Google have recently announced that they are also entering the web-font market &#8211; with the same free, hosted model as ours.<br />
Although we have put 100&#8217;s of hours into the design, development and readying of 150+ fonts (x4 formats = 600!), with only weeks before font-face.com was ready to go live, we have decided to bow out now. A bitter blow to the team.<br />
Our decision has not been easy. Although we feel we would offer a better service, we would after all be competing with Google. A massive might to compete with.<br />
The last thing we would want is to host fonts for everyone to link to, only to at some point (after google have beaten us) be forced to turn them off &#8211; destroying your website designs.<br />
So as not do disappoint you in the future, we have decided to stop now. Have no fear though &#8211; we will be back! We are hatching a new plan for font-face.com &#8211; stay tuned!<br />
font-face.com will still be the home of everything font-face, just not in the original way it was intended.<br />
Thanks<br />
The font-face.com Team x x</p></blockquote>
<h3>Quitters ≠ Cowards</h3>
<p>These folks quit right before launch because Google threw their hat into the ring. I think it&#8217;s defeatist to say you&#8217;re going to get crushed. Or that you&#8217;re afraid to disappoint customers that you don&#8217;t even have yet. </p>
<p>On one hand, if they are struggling and not committed, then Google is a good scapegoat. And on the other hand, I can empathize with having to toss your creative efforts out. I put the brakes on some projects after they launched because the timing was wrong, I didn&#8217;t know what I was doing, or just plain sucked at something. But you don&#8217;t know if you don&#8217;t try. </p>
<p>The only Steve Jobs quote worth remembering: &#8220;Real artists ship.&#8221;<br />They do not give up because of a perceived danger. </p>
<h3>Google has no Variety. Yet.</h3>
<p>Right now <a href="http://code.google.com/webfonts">Google font list</a> is quite limited. By contrast <a href="http://www.fontsquirrel.com/">Font Squirrel</a>, <a href="http://typekit.com/">Typekit</a>, <a href="http://kernest.com/">Kernest</a> are way ahead. A modicum of variety is all it take place anyone ahead of Google in the running. Google isn&#8217;t there yet. But by entering the web fonts market, Google is validating the need for this service at a very public level. Their presence brings wider awareness to web fonts in general, and helps everyone in this situation. A rising tide floats all boats. </p>
<p>If <strong>@font-face.com</strong> were truly passionate about their product, and their service truly is better, then Google would eventually have to bow-out (not likely), buy them up (long shot), or make their service surpass theirs (most likely). Therefore, by laying down now, they&#8217;re lowering the bar for everyone. </p>
<h3>Get Back in the Ring</h3>
<p>This news is bittersweet. Google is into web fonts! Yay! @font-face is out! No! Really? WTF?  Why do they have to be mutually exclusive? I say to @font-face: Pick yourselves up. Retract your defeatist email. Launch in two weeks and see what happens. </p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/05/font-face-com-rolls-over/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chrome, Safari Do Not Feature a Hard Refresh</title>
		<link>http://nowdirection.com/2010/04/chrome-safari-do-not-feature-a-hard-refresh/</link>
		<comments>http://nowdirection.com/2010/04/chrome-safari-do-not-feature-a-hard-refresh/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 15:24:59 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=663</guid>
		<description><![CDATA[WebKit FTW? Then add the "hard refresh" or "force reload."]]></description>
			<content:encoded><![CDATA[<p>One of the biggest features keeping Chrome from being the browser of choice for developers, is that you cannot perform a &#8220;hard refresh&#8221; or a &#8220;force reload&#8221; of the entire page like you can in Firefox. WebKit is fantastic for many things, but this shortcoming needs to be remedied! </p>
<p>On Mac, you press [Cmd + R] to refresh. And Firefox has the extra ability to force a refresh all the page resources (regardless of any Keep-Alive, Last Modified or TTL headers) by pressing [Cmd + Shift + R]. </p>
<p>I&#8217;d like to clarify that it&#8217;s not a &#8220;make Chrome smarter issue,&#8221; it&#8217;s a basic UI &#8220;make Chrome more usable&#8221; issue. And it has roots way back in WebKit. Frankly, this lack of instant updates is why I&#8217;ve never been able to rely on WebKit for web development. </p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/04/chrome-safari-do-not-feature-a-hard-refresh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>YouTube API Errors</title>
		<link>http://nowdirection.com/2010/04/youtube-api-errors/</link>
		<comments>http://nowdirection.com/2010/04/youtube-api-errors/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 15:49:30 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=655</guid>
		<description><![CDATA[YouTube API returns videos when it feels like it.]]></description>
			<content:encoded><![CDATA[<p>Have a look at the <a href="http://youtube.com" target="_blank" title="YouTube.com homepage">YouTube.com</a><br />
homepage today:<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/04/YouTube-Clast-of-the-Titans-error.png"><img src="http://nowdirection.com/wp-content/uploads/2010/04/YouTube-Clast-of-the-Titans-error-490x301.png" alt="YouTube embedded player error on their homepage" width="490" height="301" class="size-large wp-image-656" /></a></p>
<h6>^ What a black eye</h6>
<h3>An error occurred, please try again later.</h3>
<p>I absolutely hate this error. Even the folks who made this Clash of the Titans campaign <strong>right on the YouTube homepage</strong> have this error. WTF. While it&#8217;s good to know that I&#8217;m not alone, this does not bode well for YouTube support. You&#8217;d think that this kind of major ad buy would help you get some kind of development assistance, especially if you&#8217;re on their homepage!</p>
<p>I rant because this error has plagued me this past month. I&#8217;ve used the Google AJAX Search API to embed videos, and the YouTube API to build a feed for a custom player. Both methods result in the same error, inconsistently. </p>
<p>When Flash upgraded their security in 2009, it basically broke a lot of cross domain functionality that we developers had relied on to serve-up content. And a simple <strong>crossdomain.xml</strong> file does not fix this error. </p>
<p>Jeff Posnick of the YouTube API team posted <a href="http://osdir.com/ml/youtube-api-gdata/2010-02/msg00275.html" title="allowScriptAccess/allowDomain settings for ActionScript developers - msg#00275">this note</a> in a thread a while back. So the custom player was rewritten from scratch in AS3 in hopes that a supported version with the <strong>Security.allowDomain(&#8221;www.youtube.com&#8221;);</strong> method would work. After implementing these suggestions, still no luck. </p>
<h3>YouTube API: It&#8217;s Not the Size That Counts</h3>
<p>Another solution we tried was different sizes.<br />
In testing, some videos wouldn&#8217;t play unless they were HD. Or 480p. Or 360p. But sometimes they wouldn&#8217;t play at all. Other times they would play only one size. But when retesting the videos, they would work with a different size! And some not at all&#8230; Then, we built size-checking into the player so that if it returned an error, it would request the next size. This method succeeded as much as it failed. So much for that approach.</p>
<p>In our testing we&#8217;ve gotten return errors of &#8220;0&#8243; and &#8220;100&#8243; meaning that the API thinks these videos are removed, banned or otherwise restricted by the user. In truth, they are not restricted, so there seems to be a disconnect between the requested video and what the API returns. </p>
<p>This error is so frustrating because it&#8217;s so inconsistent. And, yes, trying again later sometimes &#8220;fixes&#8221; it. But then, the other requested videos are broken. Right now I have no fix. I have videos that sometimes play. That is the best that you can get from the YouTube API. </p>
<p>I personally suspect that YouTube&#8217;s API and their CDN are not integrated as soundly as we think. </p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/04/youtube-api-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox and the A IMG Combo</title>
		<link>http://nowdirection.com/2010/02/firefox-and-the-a-img-combo/</link>
		<comments>http://nowdirection.com/2010/02/firefox-and-the-a-img-combo/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 02:10:35 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=641</guid>
		<description><![CDATA[I noticed this a few Firebug upgrades ago&#8230; but I didn&#8217;t care to solve it until now. 
When you inspect an IMG (image) tag that is wrapped in an A (anchor) tag, you will see that the A tag is not actually expanding to cover the image. (Fig 1.) The A tag is represented as [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed this a few <a href="http://https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank" title="Firebug add-on for Firefox browser">Firebug</a> upgrades ago&#8230; but I didn&#8217;t care to solve it until now. </p>
<p>When you inspect an IMG (image) tag that is wrapped in an A (anchor) tag, you will see that the A tag is not actually expanding to cover the image. (Fig 1.) The A tag is represented as a horizontal bar that extends several pixels above and below the baseline of your image. </p>
<p>At first this is surprising, but once you verify that it still functions as expected, you scratch your head and move on to more pressing matters. And pray that the Pixel Bitch doesn&#8217;t notice. </p>
<p><a href="http://nowdirection.com/wp-content/uploads/2010/02/a-img-before.jpg" rel="lightbox"><img src="http://nowdirection.com/wp-content/uploads/2010/02/a-img-before-300x235.jpg" alt="a-img-before" title="a-img-before" width="300" height="235" class="alignnone size-medium wp-image-642" /></a></p>
<h6>Figure 1. Inspecting the A tag of the <em>A IMG</em> combo (with Firebug in Firefox). See how it&#8217;s flattened at the base of the image? ^</h6>
<p>I played with the CSS display property of the A tag until I got it to cover the image. First try: <code>div.ad a { display:block; }</code></p>
<p>Okay, so now the &#8220;A&#8221; tag now displaces the correct height of the image. <em>And</em> there is the added benefit of losing that extra 5px or so pixels of vertical margin underneath of the image. (Fig. 2.) It&#8217;s odd because that amount of space has a certain minimum height that&#8217;s based on the font and line-height since the default is <strong>display:inline</strong>.<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/02/a-img-after-1.jpg" rel="lightbox"><img src="http://nowdirection.com/wp-content/uploads/2010/02/a-img-after-1-490x423.jpg" alt="a-img-after-1" title="a-img-after-1" width="490" height="423" class="aligncenter size-large wp-image-652" /></a></p>
<h6>Figure 2. Fixed on inspection and behaving properly!^</h6>
<p>The net effect is about a five pixel decrease in padding under the image. And if you still have <strong>:focus</strong> on, you&#8217;ll see that it snugly wraps the image border instead of just appearing at the base. </p>
<p>The permanent fix to this minor issue? Set display block on all A tags that have child IMG tags.<br />
<code><br />
     a>img { display:block; }<br />
</code></p>
<p>Veddy nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/02/firefox-and-the-a-img-combo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Print CSS: Kick Ass THEN Take Names</title>
		<link>http://nowdirection.com/2010/01/debugging-print-css/</link>
		<comments>http://nowdirection.com/2010/01/debugging-print-css/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:22:05 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=597</guid>
		<description><![CDATA[How to debug and deconstruct a print stylesheet. ]]></description>
			<content:encoded><![CDATA[<p>When your client requests a print stylesheet that matches only the content area of the site, you my friend are in luck. Just follow this formula: <strong>Kick Ass, <em>then</em> Take Names.</strong> </p>
<p>We&#8217;re familiar with the <a href="http://www.alistapart.com/articles/goingtoprint/" target="_blank" title="A List Apart: Going to Print">ALA method</a> of generating a print stylesheet. The basic idea (assuming you have well-structured HTML) is to add a few &#8220;noprint&#8221; classes to  specific page divisions and make them disappear. Then, format what&#8217;s left to generate nicely-printed page. </p>
<p>From a Content Management point of view, this is essentially a <strong>print view</strong> of your page. The only problem is that the User can print from the browser at any time, so you  cannot rely on the &#8220;Print this page&#8221; link for pretty CMS print templates. This is another justification for the eventual universal Print Stylesheet.  </p>
<h3>THE PRINT STYLESHEET</h3>
<p>A year ago, the client had a nicely printed page. My tweaks were confirmed by a graphic designer with experience in print (who has &#8211; and still does &#8211; typeset books). But the client doesn&#8217;t want a page of type, designed or not. The client wants what&#8217;s on the screen in the content area. (Fig. 1)<a href="http://nowdirection.com/wp-content/uploads/2010/02/original-page.jpg"><img src="http://nowdirection.com/wp-content/uploads/2010/02/original-page.jpg" alt="original-page" title="original-page" width="460" height="368" class="alignnone size-full wp-image-619" /></a></p>
<h6>Fig. 1. The standard template with the Header, Navigation, Content Area, Sidebar and Footer parts blocked-out. ^</h6>
<p>Once you get a stylesheet link added to the header (ensure that the media tag is set to &#8220;print&#8221; ), it&#8217;s easy to start debugging. First, refresh your page. Next, hit <strong>Crtl +P</strong> (or <strong>Cmd+P</strong>) to bring up your OS&#8217;s print menu. Then, hit &#8220;Print Preview.&#8221; On Mac OS 10, you&#8217;ll get a PDF of the printed page in <strong>Preview</strong> app. On Windows XP I think it&#8217;s a resized screen capture. </p>
<p><small>[On a related note: <a href="http://support.microsoft.com/kb/888241" target="_blank" title="Microsoft Support: IE 6 Print Preview Crash">IE 6 cannot have table row padding greater than zero, or else it will crash Print Preview</a>.]</small></p>
<p>Then it&#8217;s an <strong>Alt + Tab</strong> flick back to the CSS editor. Save. Then back and forth to the browser. Refresh. Print. Preview. </p>
<h3>DEBUGGING PRINT CSS</h3>
<p>A previous developer took a stab at the aforementioned standard technique and got rid of the backgrounds and some of the main areas. This was a solid head start, but I ran into the same things that he did.  There were still inheritance issues. And the ASP .NET FORM and extraneous DIV elements didn&#8217;t help. </p>
<p>I took a swing at it, and started from the outer DIVs and targeted the header, logos, sidebar, menus, and container elements, setting them all to <code>display:none</code>. That worked okay, but it still created positioning inheritance issues. Some DIVs still appeared to hold their shape and position contradicting what looked like obvious overrides. </p>
<p>To better see what was going on, you usually just put a border on all DIVs. But I also incorporated one of the techniques for adding the actual URL address in parenthesis after an underlined link term in the copy. It amounts to some decent code that will help you identify the elements in your print preview. At the end of your print stylesheet, add this print debugging CSS:<br />
<code><br />
    div { border:1px solid aqua; }<br />
    div:before { content:"div: " attr(id) "-start"}<br />
    div:after { content:"div: " attr(id) "-end"}<br />
</code></p>
<p>Basically, it will trace all the divisions of your page, and add the DIVs&#8217; ID attributes to them so that you can see who&#8217;s doing what. I find it extremely helpful when fine tuning CSS selectors.  (Fig. 2.)<br />
<a href="http://nowdirection.com/wp-content/uploads/2010/02/after-css-attr.jpg"><img src="http://nowdirection.com/wp-content/uploads/2010/02/after-css-attr.jpg" alt="after-css-attr" title="after-css-attr" width="460" height="450" class="alignnone size-full wp-image-625" /></a></p>
<h6>Fig. 2. Print preview of the debugging CSS.^</h6>
<h3>KICKING ASS</h3>
<p>After an hour of not getting the DIVs to disappear, I stopped this silly outside-in approach of stringing huge DOM selectors to try and override all the previous styles. I went for the nuclear option. I deleted the print styles and replaced them all with one line:<br />
<code>div { display:none }</code></p>
<h3>TAKING NAMES</h3>
<p>Then, I gave the body a black border <code>{ border:1px solid #000; }</code> and set the margins and width on it, similar to the &#8220;artboard&#8221; in Adobe Illustrator. From there, I walked down the DOM tree of the Content Area, turning &#8220;on&#8221; each DIV, and adjusting dimensions as I went. The print debugging code (above) helped because I could see each new border turn &#8220;on&#8221; as I saved a new rule.<br />
<code>#someElement {display:block; margin:0. padding:0; position:relative; visibility:visible; }</code></p>
<p>For this fairly good-sized site, this approach worked very well. Nuke everything, then turn on only the parts you want. By contrast, to go and name everything you <em>don&#8217;t</em> want can be error-prone, time consuming, and inefficient to code!</p>
<p>In the end I displayed exactly what the client wanted (their content area) and it even saved them some time &amp; money. </p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/01/debugging-print-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Speed Up Firefox. Significantly.</title>
		<link>http://nowdirection.com/2010/01/speed-up-firefox-significantly/</link>
		<comments>http://nowdirection.com/2010/01/speed-up-firefox-significantly/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 16:00:50 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=614</guid>
		<description><![CDATA[I was browsing over here and found a client-side solution that makes Firefox fly. 

Open a new tab and go to about:config
Type in &#8220;network.http.pipelining&#8220;
Click the booleans to switch their values to true, and double the integer to &#8220;8&#8243; instead of &#8220;4.&#8221;
Close the tab.

Happy surfing!
]]></description>
			<content:encoded><![CDATA[<p>I was browsing over <a href="http://www.die.net/musings/page_load_time/" title="Optimizing Page Load Time" target="_blank">here</a> and found a client-side solution that makes Firefox fly. </p>
<ol>
<li>Open a new tab and go to <strong>about:config</strong></li>
<li>Type in &#8220;<strong>network.http.pipelining</strong>&#8220;</li>
<li>Click the booleans to switch their values to <strong>true</strong>, and double the integer to &#8220;8&#8243; instead of &#8220;4.&#8221;</li>
<li>Close the tab.</li>
</ol>
<p>Happy surfing!</p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/01/speed-up-firefox-significantly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three Stylesheets Walk Into a Bar&#8230;</title>
		<link>http://nowdirection.com/2010/01/three-stylesheets-walk-into-a-bar/</link>
		<comments>http://nowdirection.com/2010/01/three-stylesheets-walk-into-a-bar/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 05:16:33 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=609</guid>
		<description><![CDATA[This is an overview of CSS work with Content Management Systems and a bit about CSS optimization. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://aaronmentele.com/" target="_blank" title="Charisma 18">Aaron Mentle</a> presented this point at BarCamp South Dakota last summer. Coincidentally, I was in the shower that very morning thinking the same thing. </p>
<p>There are basically three stylesheets that you end-up with when templating a CMS: </p>
<ol>
<li><strong>The Browser Reset</strong> &#8211; By now, you should have a comprehensive version set to some hotkeys. Between <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/" target="_blank" title="Eric Meyer's CSS Reset">Meyer&#8217;s</a>, <a href="http://developer.yahoo.com/yui/base/" target="_blank" title="Yahoo! User Interface Tools v2">YUI</a>, and the several <a href="http://960.gs/" target="_blank" title="960 Grid System">popular</a> <a href="http://code.google.com/p/blueprintcss/" target="_blank" title="Blueprint CSS ">CSS</a> <a href="http://baselinecss.com/" target="_blank" title="Baseline CSS">scaffolds</a>, I&#8217;ve never written one from scratch.</li>
<li><strong>The Surround</strong> &#8211; This is the big one, where half of your CSS work is done to create a functional page layout that matches the design. This can include, but is not limited to a header, breadcrumbs, navigation, sidebar(s), tertiary navigation and a footer. </li>
<li><strong>The Content Area</strong> &#8211; This is the other half where your users can enter content in their admin editor area. This can be straight text, a WYSIWYG editor, or even sorted views of content straight out of the CMS. Just when you think you&#8217;re done, there&#8217;s forms that have to live in the Content Area, too!</li>
</ol>
<p>The browser has to load all of these so your h1 tag gets assigned about four times! Once from the internal browser styles, then it&#8217;s reset, then it&#8217;s spec&#8217;d for the design, then it&#8217;s declared yet again when it cascades into the content area. Graciously, modern browsers are wickedly efficient when doing this. </p>
<p>Which begs the question: could your site be more efficient? What if you just set the values from the start? Sorry to disappoint, but it&#8217;s basically negligible. However, there are a few things that you can do to optimize your CSS for browser DOM crawling. This is more of a philosophy about organizing your stylesheets, too.  </p>
<ol>
<li><strong>Use IDs</strong> &#8211; There should only be one ID per document, so once a browser finds it, it can disregard the rest of the DOM.</li>
<li><strong>Namespace any HTML tags with ids</strong> &#8211; <code>#Header h1</code> Instead of searching the entire document for every <strong>h1</strong> tag, the browser can focus on the <strong>#Header</strong> div to look for <strong>h1</strong>s exclusively.</li>
<li><strong>Use only one class in a selector</strong> &#8211; Because every DOM element has the potential to have many classes, you need to limit their use to one or two specific ones.</li>
</ol>
<p>Happy styles!</p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/01/three-stylesheets-walk-into-a-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neutraface Parody Video</title>
		<link>http://nowdirection.com/2010/01/neutraface-parody-video/</link>
		<comments>http://nowdirection.com/2010/01/neutraface-parody-video/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:07:16 +0000</pubDate>
		<dc:creator>benxamin</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://nowdirection.com/?p=564</guid>
		<description><![CDATA[I originally tweeted this back in December. At that point, I had only heard Lady Gaga&#8217;s Pokerface song on the satellite radio pop channel twice on the drive back from Peru, IL July 2009.
Now, her new hit Bad Romance is making record airplay. And the video is awesome. Now, we take a few minutes to [...]]]></description>
			<content:encoded><![CDATA[<p>I originally tweeted this back in December. At that point, I had only heard Lady Gaga&#8217;s <em>Pokerface</em> song on the satellite radio pop channel twice on the drive back from Peru, IL July 2009.<br />
Now, her new hit <em>Bad Romance</em> is <a href="http://en.wikipedia.org/wiki/Lady_gaga#cite_note-57" target="_blank" title="Bad Romance airplay record citation @ Wikipedia">making record airplay</a>. And the video is awesome. Now, we take a few minutes to pay tribute to the one of her first big hits, with this genius send-up from your <a href="http://jarkandmason.blogspot.com/" target="_blank" title="Mark &amp; Jason">favorite bearded typographers</a>.<br />
<object width="425" height="250"><param name="movie" value="http://www.youtube.com/v/xHCu28bfxSI&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xHCu28bfxSI&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="250"></embed></object><br />
I loved <a href="http://www.houseind.com/fonts/neutraface" target="_blank" title="Neutraface@House Industries web site">Neutraface</a> before I loved Lady Gaga. </p>
]]></content:encoded>
			<wfw:commentRss>http://nowdirection.com/2010/01/neutraface-parody-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
