Render icons in a div tag when using a class name

Same as #964 but span as been replaced by div. 
Also rebased it from master.