Form elements are by default inline elements which means they line-up by default after each other on the same line. This didn't happen with your form, because your HTML was weird.
Div tags are block level elements which means the fill up a whole line, so the next one starts on the next line.
I made a little demo from the above with some basic CSS:

body {
padding: 10%
}
div {
margin-bottom: 1em;
}
label, input, select {
/* changed to 'inline-block' so we can give them a width,
* but also height, margins and paddings if we need to
*/
display: inline-block;
vertical-align: top;
width: 200px;
/* following hacks if you must support IE 7 and even IE6 (lol),
* because 'inline-block' was not supported in those browsers.
*/
*display: inline;
*zoom: 1;
}