Refactored implementation using DIV tag and css