Reputation:
I want the label category to be horizontally at par with Select Category drop down. Same for other form items.
Here's my CSS:
.labelContainer {
clear: both;
float: left;
width: 200px;
}
.inputContainer {
clear:left;
float: left;
width: 200px;
}
And some of my HTML:
<div class="labelContainer">
<label for="Date">Date</label>
</div>
<div class="inputContainer">
<input type="text" id="datepicker" name="datepicker"/>
</div>
Upvotes: 1
Views: 113
Reputation: 1736
The clear: left on you .inputContainer prevents the two divs to be next to each other.
HTML:
<div class="labelContainer">
<label for="Date">Date</label>
</div>
<div class="inputContainer">
<input type="text" id="datepicker" name="datepicker"/>
</div>
<div class='clearfix'></div>
CSS:
.labelContainer {
float: left;
width: 200px;
}
.inputContainer {
float: left;
width: 200px;
}
.clearfix {
clear: both;
}
You can check it here: jsfiddle.
Upvotes: 1
Reputation: 84
Remove the clear:left from the .inputContainer class CSS :
CSS:
.labelContainer {
clear: both;
float: left;
width: 200px;
}
.inputContainer {
float: left;
width: 200px;
}
Upvotes: 0
Reputation: 142
Use positioning to position your select menu
.inputContainer{
position:relative;
bottom:10px;
left:20px;
}
Upvotes: 0