refactor table styles with class name and cnf