Old Tin Roof

A little bit of me, and everything else

Ninja business card throwing

I had to share this. These are some amaz­ing busi­ness card ninja like skills! And, yes, I know it’s a viral ad, but it’s worth shar­ing the good ones… (via Mike D)

User experience or computer experience?

This note was sparked by a con­ver­sa­tion I had ear­lier this month regard­ing entry of dates in forms, and by John Gruber’s recent link to a wall of shame that shows which online stores that require a spe­cific form of entry for credit card num­bers in web forms.

It took 5 times?

A few years ago, I was for­tu­nate to see a usabil­ity lab that was try­ing to deter­mine drop out rates on a group of spe­cific e-commerce forms.  The biggest rev­e­la­tion I had at the time was pro­vided by watch­ing a gen­tle­man cus­tomer try 5 times (unsuc­cess­fully) to enter his date of birth into a form, in the way that the form required.

The form had a small amount of help text show­ing that he should enter it as dd/mm/yyyy, but the error mes­sage just asked for a ‘valid date’.  The gen­tle­man pro­fessed to not be very com­puter savvy, but it really high­lighted to me how we often force users to fit in with our model of how a form should behave.

Show­ing our cleverness

For a while I accepted that we needed to val­i­date the date so that it could be stored in a data­base, or manip­u­lated by some piece of code.  More recently I’ve seen a cou­ple of imple­men­ta­tions of on-the-fly date for­mat­ting (in JS) that take the entered date, in what ever for­mat, and rewrite it in the for­mat we want.  So a date entered as ‘23rd March 1997′ would get changed to ’23/03/1997′ (in UK date format).

Although I can under­stand that we’d need to do this at some point to make it easy to store, do we really need to do it in front of the user?  Is it not a bit like say­ing ‘OK thanks for enter­ing a valid date but we wanted you to type it like this, so we’re just going to change it for you and show you even if it makes you think you got it wrong’?

Surely with improve­ments in mod­ern devel­op­ment prac­tices we should be val­i­dat­ing against valid dates client side (using per­haps your favourite JS library of choice), then per­form­ing the con­ver­sion on the server side, before stor­ing it or using it as we wish?

I think I need to inves­ti­gate this a bit further…

Table cell min-height in Firefox

This week I came across a cou­ple of cross-browser css quirks that I’d never seen before (I guess because I’d never needed to imple­ment the ele­ments that caused them).  One that really stood out was the way that Fire­fox han­dles height val­ues on table cells dif­fer­ently to other browsers.

Most browsers use the nor­mal ‘con­tent box’ model to ren­der table cell con­tent (some slightly dif­fer­ently, and we have all had to deal with these box model quirks over the years), but Fire­fox uses the ‘bor­der box’ model.  You can see a group of exam­ples on Bruno Fassino’s site.

Sim­ply put, it changes the cal­cu­la­tion of the total ren­dered height of the table cell.  So set­ting a height of 130px and a bor­der of 5px means that the cell will be ren­dered as 140px in Fire­fox but 130px in every other browser. Bah!

The differences between the types of box models

It also ignores min-height val­ues, and treats height val­ues as min-height instead.

There is a CSS3 prop­erty called box-sizing, that allows you to spec­ify which model you want to use, but that changes the model for the width as well, which causes some more issues for width calculations.

Solu­tions

There are a cou­ple of solu­tions to get round this if you need a whole row of table cells to be a cer­tain height, but don’t want the has­sle of work­ing out widths (if you use the box-sizing css3).

1. Find a cell on the row that con­tains a fixed height ele­ment (e.g. a but­ton, or a title you know won’t change in length), and set top and bot­tom padding on that to get what you need.

2. Or, if you don’t have a fixed height ele­ment, then you can add a div around the con­tents of a table cell and set the min-height on that.

Sim­ple fix, but it took me a good bit of pok­ing around to find the rea­son for the quirk, I hope it helps some­one else.