title: CSS : center form in page horizontally and vertically
body: <p>How can i center the form called form_login horizontally and vertically in my page ?</p>
  
  <p>Here is the HTML I'm using right now:</p>
  
  <pre><code>&lt;body&gt;
      &lt;form id="form_login"&gt;
          &lt;p&gt;
              &lt;input type="text" id="username" placeholder="username" /&gt;
          &lt;/p&gt;
          &lt;p&gt;
              &lt;input type="password" id="password" placeholder="password" /&gt;
          &lt;/p&gt;
          &lt;p&gt;
              &lt;input type="text" id="server" placeholder="server" /&gt;
          &lt;/p&gt;
          &lt;p&gt;
              &lt;button id="submitbutton" type="button"&gt;Se connecter&lt;/button&gt;
          &lt;/p&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I have tried to do the following css but my form is never centered :</p>
  
  <pre><code>#form_login {
      left: 50%;
      top: 50%;
      margin-left: -25%;
      position: absolute;
      margin-top: -25%;
  }
  </code></pre>