VivianPotthastp
New Member
I am trying center (to middle of the page) a html form using css.I already read other member's somewhat similar questions.But, I cannot figure this outThis is the HTML form:\[code\]<html><head> <link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/14574303/styles/form_style.css"> <title>My Form</title></head><body> <form action="#"> <label for="name">Your Name:</label> <input type="text" name="name" id="name" /><br /> <label for="email">Your Email:</label> <input type="text" name="email" id="email" /><br /> <input type="checkbox" name="subscribe" id="subscribe" /> <label for="subscribe" class="check">Subscribe</label> </form></div></body></html>\[/code\]and this is the CSS:\[code\]<style>form{ width: 700px ; margin-left: 0 auto;}label { text-align:right; width:100px; }input { margin-left: 10px; }label.check, label.radio { text-align:left; }</style>\[/code\]I tried quite some time.But still I could not center the form.Any guidence?Thanks