tblackb1rd
New Member
I have several radio controlgroups which are below each other and created dynamically. Until now, their distance to the left is given by the length of their legend texts which looks flattery. \[code\] <div id="datum_grp" data-role="fieldcontain" data-type="horizontal"><a class="grpLegend">Datum:</a><fieldset id="datum_1_fields" data-role="controlgroup" data-type="horizontal" class="forceinline"></fieldset><fieldset id="datum_2_fields" data-role="controlgroup" data-type="horizontal" class="forceinline"></fieldset></div> <div id="zeit_grp" data-role="fieldcontain"><a class="grpLegend">Stunden:</a><fieldset id="zeit_1_fields" data-role="controlgroup" data-type="horizontal" class="forceinline"></fieldset><fieldset id="zeit_2_fields" data-role="controlgroup" data-type="horizontal" class="forceinline"></fieldset></div>\[/code\]This fills the controlgroups:\[code\]for (var iFirstDigit = 0; iFirstDigit < 3; iFirstDigit++) { // fill radio controlgroup for date: first digit $('#datum_1_fields').append('<input type="radio" name="datum_1" id="' + iFirstDigit + '" display_text="' + iFirstDigit + '"></input><label for="' + iFirstDigit + '">' + iFirstDigit + '</label>').controlgroup('refresh'); $('#datum_grp').trigger('create'); } for (var iSecondDigit = 0; iSecondDigit < 10; iSecondDigit++) { $('#datum_2_fields').append('<input type="radio" name="datum_2" id="' + iSecondDigit + '" display_text="' + iSecondDigit + '"></input><label for="' + iSecondDigit + '">' + iSecondDigit + '</label>').controlgroup('refresh'); $('#datum_grp').trigger('create'); }for (var iFirstDigit = 0; iFirstDigit < 3; iFirstDigit++) { $('#zeit_1_fields').append('<input type="radio" name="zeit_1" id="' + iFirstDigit + '" display_text="' + iFirstDigit + '"></input><label for="' + iFirstDigit + '">' + iFirstDigit + '</label>').controlgroup('refresh'); $('#zeit_grp').trigger('create'); } // fill radio controlgroup for hours (second digit) for (var iSecondDigit = 0; iSecondDigit < 10; iSecondDigit++) { $('#zeit_2_fields').append('<input type="radio" name="zeit_2" id="' + iSecondDigit + '" display_text="' + iSecondDigit + '"></input><label for="' + iSecondDigit + '">' + iSecondDigit + '</label>').controlgroup('refresh'); $('#zeit_grp').trigger('create'); }\[/code\]As you can see, the controlgroups do not have the same indent but is related to the length of their legend texts.So I applied a "width" to class "grpLegend" hoping that this would shift all controlgroups to the right by the same amount of pixels. But this is not happening. How would you align the controlgroups so that they all have the same distance to the left?Cheers