You have wrapped a form
element inside a label
element. That’s invalid markup and has strange effects. See @verdesrobert’s answer for adequate use of label
. And you should use label
that way, for reasons of functionality.
But what are now trying to do, the styling of a form as a whole, can be done simply by setting CSS properties on the form
element. For example:
form
{
float: left;
text-align: right;
margin-right: 15px;
width: 300px;
}
(To use your styling. I would not recommend setting the width and the indentation in pixels but in em
units.)