Here is my code:
<div>
<label>Name</label><input type="text" id='name'/><br />
<label>Email</label><input type="text" id='email'/><br />
<label>Place</label><input type="text" id='place'/><br />
</div>
I'm new to CSS, I don't want table to get aligned, but the perfection should be like same, and don't want to apply style to individual elements. Any help is appreciated.
I'm assuming you want to align the labels and inputs next to one another, in which case you'll be needing floats. Here's the quick css code:
form {
width: 500px;
overflow:hidden;}
label {
clear: both;
float: left;
width: 40%;}
input {
float: left;
width: 55%;}
I think that should work :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With