Refactored CSS code

re-wrote CSS code