I have tried everything to align these boxes, so they start from the same place downwards.
I’m not sure which div to put in my stylesheet
<div class="boxes">
<p class="h3"> You are able to add up to 3 addresses.
Please select the type of address, using the following guide
<ul>
<li>H: Permanent home address</li>
<li>P: Postal address (where you will be from June to September)</li>
<li>L: Local address (where you currently live)</li>
</ul>
</p>
<div id="address">
<div id="input1" style="margin-bottom:4px;" class="input">
Street<span class="required">*</span>
<input name="Street[]" type="text" >
</div>
<div id="input2" style="margin-bottom:4px;" class="input">
Line2
<input name="Line2[]" type="text" >
</div>
<div id="input3" style="margin-bottom:4px;" class="input">
Line3
<input name="Line3[]" type="text" >
</div>
Any ideas?
Having amended your HTML, to wrap the label/associated text in actual
labelelements, added aforattribute to those elements and a correspondingidattribute to theinputelements:The following CSS works:
JS Fiddle demo.
In the above, once the text was wrapped in a tag (to become the
labelelement), it could then be assigneddisplay: inline-block;and could then be given awidth. Also, white-space was removed from between the close of thelabeland the opening of theinput, in order to prevent white-space in the HTML file causing any space between the two elements.