changed anchor fix strategy from css to js

Cancelled changes made in 2a15451cca418424ff196439aed2639278787251 (fix
using CSS), and re-introduced the fix using JavaScript.