Archive for February, 2008
High Performer: Garyweeks.com, Handcrafted Furniture and Impressive Guarantee
Wednesday, February 27th, 2008How to recreate Silverback’s Parallax
Wednesday, February 27th, 2008When I was a lad, I remember being wowed by an effect in Sonic the Hedgehog known as parallax scrolling. Moving my little spiky friend to the right caused the foreground to move past the camera to the left faster than the background, creating a faux-3D view of Green Hill Zone.
We can create a similar effect on a web page by fixing semi-transparent background images to different sides of the browser viewport, and at different horizontal percentage positions. In addition to this, blurring some of those images will emulate focus and depth-of-field. The effect can only be seen as the browser window is resized, but I really like the subtlety of this — not everybody will notice it, but it’s like a hidden Easter egg for those who do.
I used this effect with great success on the holding page for Clearleft’s latest project, Silverback.
Upfront about IE6
Frankly, this just ain’t gonna happen in IE6. Although we could use javascript to force the browser to display transparent PNGs, its not suitable for this effect. We could use alpha-transparent GIFs instead, but the lack of anti-aliasing will end up looking terrible. My recommendation is to think about your target audience and the browsers they will likely be using, show this effect to those with Safari, Firefox, Opera, or IE7 and use conditional comments to override it in IE6. In my example below, IE6 users just see a flat background image and are none the wiser.
Choosing a suitable scene
It’s a web page that we’re creating, so as always we should be mindful of file sizes. Because it uses large transparent PNGs this effect isn’t frugal on the bandwidth, and although we’re not going to achieve this in under 100k, we should obviously try to avoid making the total image filesize 500k or more! To avoid large file sizes, we should restrict the height of each layer, or choose a scene which works well with horizontally tiled layers. It’s always a compromise because too much tiling becomes obvious and reduces the impact of the effect.
As you can see from Silverback, hanging vines lend themselves nicely to being split into multiple layers because they are positioned in the foreground, middle distance, and background. You might choose a plane flying through some clouds, or a city-scape with houses and skyscrapers. To use a cliché, the only limit is your imagination … and the fact that you should only use 3 or 4 layers. Any more and the overall file size would be too much of a strain on those with delicate Intertubes.
Your page content will become one layer within the scene, and since even the transparent areas of images can’t be clicked "through", its best to make your content the foreground element unless your page contains no links or forms. We can fake elements nearer to the "camera" if they don’t overlap the content. I’ll come to that later.
Creating your layers
Looking at the Silverback site, there are three layers of vines (1, 2, 3) plus the main content layer at the front (4). Although all of the vines are technically "behind" the main content layer, the foreground vines look closer to the camera because they’re larger, very blurred, and don’t stretch far enough down the screen to ever dip behind Steve (the gorilla) and shatter that illusion.

The main content of the site will naturally be the focal point of the camera, and in the Silverback example the middle distance layer of vines - which appears to be slightly behind the main content - is left without a blur to give the impression that they’re roughly the same distance from the camera as Steve.
Lastly, the back layer of vines are blurred (though not as much as those in the foreground) and slightly lighter, as if fading away into the misty distance. These vines are flattened onto the green gradient which forms the background of the page - since we don’t need to see anything further into the distance, we can use an opaque JPG instead of a transparent PNG. This saves on file size, and as a result allows us to use an image with larger dimensions for the background if we like.
Creating the parallax
There really is nothing new about the CSS we use to create this effect - it’s just cleverly applied. I will give code examples not because it’s difficult but precisely to show how simple it is.
We wrap the content in a div which is centered on the screen using this CSS:
div#content{ margin:0 auto; width:640px;
}
For the purposes of positioning the other layers we need to think in percentages, so it makes sense to do the same thing here. Centering the content effectively positions it 50% of the way across the screen. As you make the browser window smaller, it moves horizontally at half the speed of the window-edge that you’re pulling around with your mouse.
The background layer of vines is tiled horizontally across the body of the website, and positioned 20% of the way across the screen. Although this doesn’t change how it initially looks, it does change how it behaves - 20% of the width is relative to the screen size, so as you make the window smaller the 20% gets proportionally smaller, giving the illusion that the vines are moving slowly to the left (at a fifth of the speed of your mouse).
body{ background:#d3ff99 url(../images/bg-rear.jpg) 20% 0 repeat-x;
}
The middle distance layer of vines is a tiled transparent PNG background on a div wrapped around the content. It needs to appear to be between the content and the background, so we need to choose a percentage between 50% (the content) and 20% (the background). For this example, I’ve chosen 40% to position them closer to the content than the background. When you resize the browser you’ll notice that they move slower than the main content, but not by much.
div#midground{ background: transparent url(../images/bg-mid.png) 40% 0 repeat-x; margin: 0; padding: 0; width: 100%;
}
The enlarged and blurred foreground layer of vines follows the same pattern, but for added fun we position the background beyond the top right of the browser window, at 150% (100% would be fixed to the top right), to make it move faster than the browser resize! This gives the illusion that they’re really close to the camera.
div#foreground{ background: transparent url(../images/bg-front.png) 150% 0 repeat-x; margin: 0; padding: 0; width: 100%;
}
Nothing fancy for IE6
Finally, we use conditional comments to make sure IE6 only sees a flat image with no faux-3D effect. Remember to override the foreground style even if you’re overriding it with nothing, by specifying background:none.
body{ background:#d3ff99 url(../images/gradient.gif) 0 0 repeat-x;
}
#midground{ background:transparent url(../images/flatvines.jpg) top center repeat-x;
}
#foreground{ background:none;
}
And that’s it! Feel free to use the source code of the Silverback holding page as an aid to understanding my method. There are a couple of variations to this effect, which I’ll mention now.
Genuine foreground
We can move the empty foreground div to the start of the HTML and add the following lines to the div#foreground CSS to position it actually in front of the content. Doing this will allow its background image to dip over the content but will also mean that the content can’t be clicked. Only use this if your content contains no links or form elements.
position:absolute;
top:0;
left:0;
z-index:1;
Genuine foreground demo (for the purposes of this demo the content is nearer to the top of the page so that it dips behind the shorter foreground vines).
The Rissington Effect
With hat tipped gratefully in the direction of The Rissington Podcast, I should mention the joys of playing around with negative percentages. Notice that the Spitfire at the bottom of their website cleverly moves off the screen to the left as you widen the browser window. It’s positioned at -5%, and the wider the browser the larger 5% of it is, so the further it moves to the left. In our example, if you set the background layers to have negative percentages you can make the landscape appear to rotate around the content as you resize the browser. The more extreme the percentages, the faster the rotational effect.
My happy ending
With all my designs I like to try to include something remarkable, pushing the boundaries of what can be achieved using just HTML and CSS. This technique, combined with others, opens the door to all sorts of possibilities. I can imagine things hiding behind solid foregrounds and only sliding into view as the browser size exceeds a certain dimensions, or elements fading into view as the browser is resized. Show me what you can do!
An easy way to add new features to Google
Tuesday, February 26th, 2008Have you ever wanted to add a new feature to Google’s search results? There’s a really nice way to do it right now. If you’re not familiar with this functionality, it’s called a Subscribed Link, and it lets you “create custom search results that users can add to their Google search pages. You can display links to your services for your customers, provide news and status information updated in near-real-time, answer questions, calculate useful quantities, and more.” That page has a whole list of different ways to add new features to Google’s search results:
* Create search results specific to your product, service, or expertise.
* Design a basic version in minutes to see how it works.
* Build a dynamic version using XML, TSV, or RSS files or feeds.
* Include images in your Subscribed Links.
* Include Google Gadgets in your Subscribed Links.
* Test your Subscribed Links interactively and get debugging messages.
* Define query patterns using lists of keywords or regular expressions.
* Invoke the calculator to help construct your results.
I like that Google provides an open system to add functionality to our search results. If this sounds interesting to you, check out this blog post by Google OS (an unofficial blog), read through the subscribed links developer guide, or check out the Subscribed link FAQ.
Let’s walk through an example. I often need to know what my IP address is. Usually I go to Google, search for [ip address], and click on one of the top results. That works okay, but I discovered that there’s an even easier way. Go to this page and click on the “Subscribe” button.
Now when you go to Google and type a query like [my ip], you’ll see the answer right in your search results, like this:

I painted out my actual IP address, but you get the idea. Now if only aruljohn.com would add the query [ip address] to the list of queries that triggers a subscribed link, that will let me be lazy and continue doing the query that I’m used to.
If you’d like to add some new functionality to Google, why not try it for yourself today? I made a simple subscribed link that looks like this:

in about a minute. It looks like you can make a subscribed link out of feeds very quickly. It looks like you can even add your own flexible gadget to Google’s search results, and it looks like this:

By the way, I originally wrote this post a little while ago focusing on how to find out your IP address with a specific subscribed link. After Yahoo announced their “SearchMonkey” project tonight (congrats to the Yahoo folks!), I figured I’d add in some details about Google’s Subscribed Links and how to make a rich snippet result using Subscribed Links.
Visual Bookshelf Taps Into Social Networking
Monday, February 25th, 2008Field Test: Social Networking, Part 3 of 3
Monday, February 25th, 2008What should NOINDEX do?
Monday, February 25th, 2008Okay, this post will be colossally boring to some people. But I wanted to give you a peek at debates behind the curtain in Google’s search quality group. Here’s a policy discussion about NOINDEX and how Google should treat the NOINDEX meta tag. First, you’ll want to read this post about how Google handles the NOINDEX meta tag. You may also want to watch this video about how to remove your content from Google or prevent it from being indexed in the first place. Here’s the conclusion from my earlier blog post:
So based on a sample size of one page, it looks like search engines handle the “NOINDEX” meta tag:
- Google doesn’t show the page in any way
- Ask doesn’t show the page in any way
- MSN shows a url reference and Cached link, but no snippet. Clicking the cached link doesn’t return anything.
- Yahoo! shows a url reference and Cached link, but no snippet. Clicking on the cached link returns the cached page.
The question is whether Google should completely drop a NOINDEX’ed page from our search results vs. show a reference to the page, or something in between? Let me lay out the arguments for each:
Completely drop a NOINDEX’ed page
This is the behavior that we’ve done for the last several years, and webmasters are used to it. The NOINDEX meta tag gives a good way — in fact, one of the only ways — to completely remove all traces of a site from Google (another way is our url removal tool). That’s incredibly useful for webmasters. The only corner case is that if Google sees a link to a page A but doesn’t actually crawl the page, we won’t know that page A has a NOINDEX tag and we might show the page as an uncrawled url. There’s an interesting remedy for that: currently, Google allows a NOINDEX directive in robots.txt and it will completely remove all matching site urls from Google. (That behavior could change based on this policy discussion, of course, which is why we haven’t talked about it much.)
Webmasters sometimes shoot themselves in the foot by using NOINDEX, but if a site’s traffic from Google is very low, the webmaster will be motivated to diagnose the issue themselves. Plus we could add a NOINDEX check into the webmaster console to help webmasters self-diagnose if they’ve removed their own site with NOINDEX. The NOINDEX meta tag serves a useful role that’s different than robots.txt, and the tag is far enough off the beaten path that few people use the NOINDEX tag by mistake.
Show a link/reference to NOINDEX’ed pages
Our highest duty has to be to our users, not to an individual webmaster. When a user does a navigational query and we don’t return the right link because of a NOINDEX tag, it hurts the user experience (plus it looks like a Google issue). If a webmaster really wants to be out of Google without even a single trace, they can use Google’s url removal tool. The numbers are small, but we definitely see some sites accidentally remove themselves from Google. For example, if a webmaster adds a NOINDEX meta tag to finish a site and then forgets to remove the tag, the site will stay out of Google until the webmaster realizes what the problem is. In addition, we recently saw a spate of high-profile Korean sites not returned in Google because they all have a NOINDEX meta tag. If high-profile sites like
- http://www.police.go.kr/main/index.do (the National Police Agency of Korea)
- http://www.nmc.go.kr/ (the National Medical Center of Korea)
- http://www.yonsei.ac.kr/ (Yonsei University)
aren’t showing up in Google because of the NOINDEX meta tag, that’s bad for users (and thus for Google).
Some middle ground in between
The vast majority of webmasters who use NOINDEX do so deliberately and use the meta tag correctly (e.g. for parked domains that they don’t want to show up in Google). Users are most discouraged when they search for a well-known site and can’t find it. What if Google treated NOINDEX differently if the site was well-known? For example, if the site was in the Open Directory, then show a reference to the page even if the site used the NOINDEX meta tag. Otherwise, don’t show the site at all. The majority of webmasters could remove their site from Google, but Google would still return higher-profile sites when users searched for them.
What do you think?
That’s the internal discussion that we’ve been having about NOINDEX meta tags. Now I’m curious what you think. Here’s a poll:
How should Google treat the NOINDEX meta tag?
I’d also be interested in (constructive) suggestions in the comments about how Google should treat the NOINDEX meta tag. Try to step into both a regular user’s shoes as well as the position of a site owner before leaving a comment.
Some Open Source Programs for Web Design
Friday, February 22nd, 2008For the last couple days I’ve been having discussions with various people about different open source programs that are available to use for web design. My feeling on open source programs is that some of them are really good, but there are other ones that the proprietary version of the program is so much better. But when you’re just bootstrapping your online business, investing $300 in a good photo editor may not be an option. In situations like this you may just have to go with an open source program.
For those of you that don’t know what open source is, it is basically where any programmer can have access to the program and as a community the program is developed and improved. These programs are also FREE which ads to their appeal. Again, in some situations I think you’re much better going with the proprietary program.
So here is a short list of some open source programs you can get for free that can help you improve your online business endeavor and my opinion on each.
FireFox is a web browser, like Internet Explorer, but in my opinion it is way better. FireFox is rapidly gaining more and more users, so if you haven’t used it you should. It’s also a good idea to make sure you website looks essentially the same in both FireFox and Internet Explorer. You can also customize a lot of things on it which makes it extra fun! (more…)
And the award winner is…
Thursday, February 21st, 2008
Here it is published details about the top ranked authors or 2007, the prizes that they got from the sponsors, and an interview with the winner, so we can know more about him and his work with PHP.
Auctiva and eBay
Thursday, February 21st, 2008This article will explain the basics of how to use Auctiva to give yourself and competitive advance and when posting items on eBay plus Auctiva is free.
What is Auctiva?
Auctiva is a web based tool that integrates directly with eBay’s database to create professional listings for free.
As we all know eBay has its standard listing fees when posting an item to it’s database. But if you want a really professional looking listing or basically want any extra bells and whistles like multiple images, scheduling, templates etc. it is going to cost you extra. However with Auctiva all of the previous mentioned extras are free with Auctiva.
How to use Auctiva?
The first thing you will need to do is create an account, to do so you can go to www.auctiva.com, make sure you first have an account with eBay and that it is a sellers account because it is going to ask you for this information when you sign up. Now you want to go to listings and create a new listing. This listing page will have everything you need to create you listing for eBay. (more…)


