javascript solution, add classes instedad of inline css