HTML structures will be the vital little bit of the website pages, however styling the structure controls physically 1 by 1 utilizing CSS could be a repetitive procedure. Bootstrap significantly disentangles the styling procedure of structure controls like information boxes, select boxes, content ranges, and so on.
The structure controls in this design are stacked with left-adjusted marks on the top.
Bootstrap provides three different types of form layouts :
- Vertical Form (default form layout)
- Horizontal Form
- Inline Form
Creating Vertical Form Layout
This is actually the default Bootstrap structure design by which styles are linked to shape controls without adding any base class to the component or any expansive changes in the markup.
The structure controls in this design are stacked with left-adjusted marks on the top.
Example Code :
<form>
<div class="form-group">
<label for="inputEmail">Email</label>
<input type="email" class="form-control" id="inputEmail" placeholder="Email">
</div>
<div class="form-group">
<label for="inputPassword">Password</label>
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
</div>
<div class="checkbox">
<label><input type="checkbox"> Remember me</label>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
<div class="form-group">
<label for="inputEmail">Email</label>
<input type="email" class="form-control" id="inputEmail" placeholder="Email">
</div>
<div class="form-group">
<label for="inputPassword">Password</label>
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
</div>
<div class="checkbox">
<label><input type="checkbox"> Remember me</label>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
0 comments:
Post a Comment