Ruby snippet: Return a different string if empty or if replacing

Wednesday, December 24th, 2008
In my latest Rails project I needed a quick way to return a string if that string happened to be blank, and also a way to return a different string if the existing string is set. Here's the solution I came up with which I placed in extras.rb in my ...

Image-based menu with CSS color property

Wednesday, December 10th, 2008
I've been covering the image-based CSS menu now quite a bit, this being my third article of the sort. Menus are very important, and there's so much that can be done with them that I figure I'd write an article on different variations to what is essentially the same menu. ...

Adding a drop down to our image-based CSS menu

Monday, December 8th, 2008
Drop down menus are all the rage! CSS drop down menus have been done before, so rather than reinvent the wheel, let's use a tried-and-true CSS drop down menu method by Patrick Griffiths and Dan Webb aptly named the "Suckerfish Dropdown." You can read more about it at A List Apart, ...

IE unordered list extra space bug

Sunday, November 23rd, 2008
I was working on converting a client's design into XHTML/CSS when I encountered something I SHOULD have faced long ago, but never did on account of my recent change in CSS practice. Since early this week, I've been starting new projects with a reset stylesheet to make my life a ...

Quick tip to fight email form spam

Saturday, August 16th, 2008
I discovered this a couple of days ago, but the simplicity and "oh wow, I should've thought of this years ago"-ness of it makes me believe I'm not the first to think of this. A few months ago I began receiving spam from the form over at my XHTML slicing site ...

Creating an image-based menu with CSS

Thursday, July 10th, 2008
The year is 2008 and I come upon a new site on a daily basis using the Javascript method of creating an image-based menu with rollover effects. I'm not talking flashy rollover effects like the types given to you by various JS libraries such as MooTools and script.aculo.us, I'm talking ...