Centering & aligning elements inside a fieldset
I currently have a fieldset which must take 96% of my container, however it is already inside a div doing the job of setting this 96% width.. This fieldset must have his elements centered but also aligned, so for example all the labels must end at the same spot and all the inputs must begin at the same spot.
This was fairly easy without the whole center problem with this code (JSFiddle):
I've tried to put my fieldset inside a div with text-align center, however it simply centers everything and doesn't align anything. I've also tried to put my form content (labels and inputs) inside another div then center this div, however this solution was not flexible enough because it required a different ID for each fieldset with the width based on the fields size.
margin: 1em auto;
I was thinking of making setting my label width to 50% or adding two divs with 50% width and text-aligning inside them, however I am not quite sure it would be the best solution at all.
Any help would be greatly appreciated