I have a complex layout with multiple elements in different divs that need to be aligned. Hardcoding the width or using JS on page load to specify values in pixels both seem like messy solutions. How can I achieve this without causing a zigzag effect?
Here is the desired result, achieved by hardcoding width: 30%
:
Markup:
<div class="panel-body">
<div class="input-group margin-bottom">
<span class="input-group-addon input-source-observer">sourceObserver_patchSize</span>
<input id="sourceObserver_patchSize" type="text" data-parsley-type="integer" min="1" max="1000000" class="form-control" data-parsley-trigger="change" placeholder="@Model.Default.PatchSize" initial-value="@Model.Custom.PatchSize" value="@Model.Custom.PatchSize.RenderIfNotEqual(Model.Default.PatchSize)">
<span class="input-group-btn">
<input type="button" class="btn btn-default" onclick="restoreInput(event)" value="Restore" />
<input type="button" class="btn btn-default" onclick="clearInput(event)" value="Clear" />
</span>
</div>
<div class="input-group margin-bottom">
<span class="input-group-addon input-source-observer">sourceObserver_scanInterval</span>
<input id="sourceObserver_scanInterval" type="text" data-parsley-type="integer" min="1" max="1000000" class="form-control" data-parsley-trigger="change" placeholder="@Model.Default.ScanInterval" initial-value="@Model.Custom.ScanInterval" value="@Model.Custom.ScanInterval.RenderIfNotEqual(Model.Default.ScanInterval)">
<span class="input-group-btn">
<input type="button" class="btn btn-default" onclick="restoreInput(event)" value="Restore" />
<input type="button" class="btn btn-default" onclick="clearInput(event)" value="Clear" />
</span>
</div>
... (other elements)
</div>