Attempt to do it in pure CSS ala 3e9cdcbc failed so using CSS and JS combo. (cherry picked from commit e2ec9eb3)