Hello,



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):
Code:
.formulaire
{
    margin: 1em auto;
    border-style: solid;
    border-width: 1px;
    border-color: #B0B0B0;
    padding: 1em;

}

.formulaire label
{
    float: left;
    width: 25%;
    text-align: right;
}
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.

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

Thanks !