Using JavaScript to dynamically create CSS styling