set inline-block style otherwise cannot compute width and height