Task preview fix

Styling needs fixing.
replace is deprecated