Smart Menu-Hover
When making a navigational menu or button of some sort, you might have an image for the normal state (a:link), the hover (a:hover), the active state (a:active) and even one for the visited state (a:visited). Usually, you would have an image load for each one like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #nav a:link { background-image:url(menu.jpg); } #nav a:visited { background-image:url(menu.jpg); } #nav a:hover { background-image:url(menu_hover.jpg); } #nav a:active { background-image:url(menu_active.jpg); } |
The browser would only load these images when these states have been activated. This would mean that the first time a user moves his mouse over the menu it wouldn't show anything different from the a:link background-image until the a:hover image loads.
There's a simple trick to get around this. Say you have a menu image like the this, you might want the first part to be the a:link and the 2nd part below it would be the a:hover background-image.
![]() |
In your CSS, you would use only 1 image (like the one one above). However, you would use a different background-position for each state:
1 2 3 4 5 6 7 8 9 10 11 12 13 | #nav a:link { background-image:url(menu.jpg); background-position:0px 0px; /*Use first part*/ } ... #nav a:active { background-image:url(menu.jpg); background-position:0px -98px; /*Use 2nd part*/ } |
![]() |
The -98px in the CSS comes from the dimensions of the image. This means that the image is loaded when the page is loaded, and thus, it also means that there is no loading for the other link states.
This method can be extended to work with the visited and active states too.
Photoshop: The split-toning effect
You might have seen this effect:
![]() |
It has become pretty easy to do in something like Adobe Lightroom. But - if you're interested in the manual process, here's one way of doing it:
- Convert an image to B&W using your preferred method (desaturate or channel-mixer or other)
- Duplicate layer (CTRL-J), use smart-sharpening filter (optional)
- Flatten (SHIFT-CTRL-E)
- Add a Colour Balance layer adjustment, select SHADOWS -> Move the yellow-blue sllider to the right. Move the cyan-red slider to the left.
- Add another colour balance layer adjustment, select HIGHLIGHTS -> Move the cyan-red slider to the right this time. Move the yellow-blue slider to the left.
- Select the blending options for the current layer-adjustment. In the blend-if section, select 'blue' from the drop-down
- Move the left slider first to about 60, then press ALT and drag it to about 200 till you have the effect you want.
- Flatten image
- You can reduce the saturation on it at this stage and you can also use the burn tool to emphasize shadows
My top WordPress plug-ins
After secretly messing around with WordPress on one of my servers, I decided to move my blog to an instance of it permanently. Being a very flexible and extensible CMS, I've been researching some plug-ins for it. So far, I've come up with this list.
- Akismet - helps block spam (and it's really good at it too). Needs an API key that's obtainable from WordPress. Plus, it's free for personal use.
- Maintenance mode - adds a maintenance splash page. When activated only authenticated users and admins will be able to browse the site.
- Search meter - keeps track of what visitors are searching for
- Feedburner Feedsmith - redirects all RSS and ATOM feeds to a feedburner RSS feed instead
- Sociable - Adds links to Digg, De.li.cio.us, Stumble-upon and other sites for you
- WP-Cache 2.0 - A really efficient page caching system and effectively makes your site faster and more responsive
- WP-PageNavi - Adds a more advanced page navigation to the bottom of pages
- Subscribe to Comments - Allows users to get e-mail notifications for any subsequent comments made
- Smilies Themer - an easy way to change the default smilies pack
- Google Analytics for WordPress - You could just add the script, but this makes it easier.
- WP-Syntax - Add syntax highlighting to code-snippets (supports many languages)
Web App: rsizr
Intelligently resize your images online. I haven't found a standalone application or Photoshop plugin that lets you do this kind of image-resizing (yet). But this is fantastic.
"rsizr is a Flash application that lets you resize JPG, PNG, and GIF images on your computer. With rsizr, in addition to normal image rescaling and cropping, you can also resize images using a new image resizing algorithm called seam carving (a method of image retargeting) that tries to keep intact areas in your image that are richer in detail.
Seam carving is a brilliant image resizing technique pioneered by Shai Avidan and Ariel Shamir. For their rockstar YouTube video and paper, click here."
Watercone
"A Product that enables anyone, in a most simple fashion, an independent, cheap and mobile solar Potable Water generation from sea water or brackish water on the base of condensation by solar still."
- Pour salty / brackish Water into pan. Then float the Watercone® on top. The black pan absorbs the sunlight and heats up the water to support evaporation..
- The evaporated Water condensates in the form of droplets on the inner wall of the cone. These droplets trickle down the inner wall into a circular trough at the inner base of the cone.
- By unscrewing the cap at the tip of the cone and turning the cone upside down, one can empty the potable Water gathered in the trough directly into a drinking device.
You can make up to 1.5 litres of water with one Watercone.





