Extacted css generation to method
Added code view