I need to center this <form> inside multiple divs

I have tried setting the margins I have tried doing them auto and setting the 
widths and feel like I am just casting about. 

Can someone help me figure this out? 

I have tried:

.loginpanel {
    text-align: center;
    margin-left: 10em;
    margin-right: 10em;
width:100em;
}


.loginpanel {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
width:100%;
}

Not working. 


Here's the css. 

<div class="loginpanel">
<h2>Returning to this web site?</h2>

<div class="subcontent loginsub">
                <div class="desc">
                Login here using your username and password
                <br>
                (Cookies must be enabled in your browser)
                <span class="helplink">
</div>
(here is the form I want to center in the browser page)
                <form id="login" method="post" 
action="http://sionline.mrooms.net/login/index.php";>
                <div class="loginform">
                        <div class="form-label">
                        <label for="username">Username</label>
                        </div>
                        <div class="form-input">
                        <input id="username" type="text" value="" size="15" 
name="username">
                        </div>
                        <div class="clearer"></div>
                        <div class="form-label">
                        <label for="password">Password</label>
                        </div>
                                <div class="form-input">
                                <input id="password" type="password" 
autocomplete="off" value="" size="15" name="password">
                                <input id="loginbtn" type="submit" 
value="Login">

                        <div class="forgetpass">
                        </div>
                                <div class="clearer"></div>
                </div>
</form>
</div>

Thank you. 

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to