Form fields overlap when the Viewport size is smaller. Is there a way that the form fields snap on the next line when the space is not enough?
Code Snippet:
<form class="compact">
<div class="row">
<div class="col-xs-6">
<section class="form-block">
<div class="form-group">
<label for="aForm_1">This is a form field</label>
<input type="text" id="aForm_1" placeholder="Enter value here" size="45">
</div>
</section>
</div>
<div class="col-xs-6">
<section class="form-block">
<div class="form-group">
<label for="aForm_2">Overlapping Text</label>
<input type="text" id="aForm_2" placeholder="Enter value here" size="45">
</div>
</section>
</div>
</div>
</form>
Here is the plunker: https://embed.plnkr.co/ynfi39fIMk1bc8bSBHAp/
@X.Vu: Please take a look at this Plnkr: https://plnkr.co/edit/6YhGmFusvo5EdySzxNpn?p=preview
and also the Clarity Forms in Grid documentation here: https://vmware.github.io/clarity/documentation/forms
You need to add the
.row
class with.form-group
as mentioned in the documentation and then use the.col-*
classes on the form fields.Also notice that I have added the
.form-control
class oninput
as that makes theinput
occupy the entire.col-*
space assigned to it.