Refactoring, JavaScript work

Need to use CSS instead of JavaScript