From Stackoverflow: Typically the CSS solution specifieds a width for the first column. This can be problematic if you don't know the width of the labels. The above solution was in StackOverFlow but I can't find the reference.