I created a .CSS file with the following:
form {width: 40%;
margin-right: 30%;
margin-left: 30%;
background-color: green}
div.mainform {width:100%;
border:1px solid #000}
Then in the HTML document that I used.
<DIV ID="MAINFORM">
<FORM>
Other HTML Markup
</FORM>
</DIV>
source
share