I followed this article and it's working but half way. See image shots below.
The Content Editor Webpart (CEWP) in 2010 does not allow scripts, it modifies the HTML when saved/edited. I faced this issue recently.
Rather that using HTML source of CEWP, use the option to link it to external file, create a text file in any document library and link the CEWP to it.
Now re write (do not copy from HTML source of CEWP) the HTML and script, it should work fine.
Hope it helps.
Use tools like the IE developer toolbar and firebug in firefox to see what's going on and tweak the CSS.