change class and tag according to css change