Forms, Separate Div For Labels And Inputs
Is this correct to have separate div for inputs and separate div for labels? For example:
Solution 1:
You can use this
<style>
.clear{
clear:both;
margin:5px;
padding:5px 0px;
}
.labels{
float:left;
width:100px;
}
.inputs{
float:left;
}
</style>
<div class="clear">
<div class="labels"><label for="place-name">Place name: </label></div>
<div class="inputs"><input type="text" name="place-name"></div>
</div>
<div class="clear">
<div class="labels"><label for="place-cat">Category: </label></div>
<div class="inputs"><select name="place-cat">
<option value="value-01">Value 01</option>
<option value="value-02">Value-02</option>
</select></div>
</div>
Post a Comment for "Forms, Separate Div For Labels And Inputs"