Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you want to center it vertically also try reading <a href="http://www.jakpsatweb.cz/css/css-vertical-center-solution.html" rel="nofollow">this</a>.</p> <p>Update:</p> <p>Try this code. Of course you can move CSS out to your css file. Tested in IE9 and FF6:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;Log In&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="stylesheet.css" /&gt; &lt;style type="text/css"&gt; #wrapper{ background-color: #ccf; position: relative; text-align: left; width: 100%; height: 100%; margin: 0px auto; } #content{ background-color: transparent; position: absolute; top: 40%; left: 0px; width: 100%; margin-top: auto; text-align: center; min-width: 900px; } table.formTable { margin-left: auto; margin-right: auto; } table.formTable td { padding: 8px; } #formLogin { width: 360px; background-color: #eeeeee; margin: 0 auto; padding: 20px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="content"&gt; &lt;div id="formLogin"&gt; &lt;table class="formTable"&gt; &lt;tr&gt; &lt;td&gt;Username: &lt;/td&gt; &lt;td&gt; &lt;input type="text" id="loginusername" name="loginusername"/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password: &lt;/td&gt; &lt;td&gt; &lt;input type="password" id="loginpassword" name="loginpassword"/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;div align="center"&gt; &lt;input type="submit" id="btnlogin" name="btnlogin" value="Log In"/&gt; &lt;input type="submit" id="btncancelogin" name="btncancelogin" value="Cancel"/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload