HTML/CSS center for all resolutions without % (percentage)
<p>I was wondering, is it possible to make this central box be "in the very" center of the page without using %?</p>

<p>I'm using VPS and I have some Python going on there, so I don't know how to use % sizes in order to get it right. But this is how far I came up only to hear that this isn't centered on 1280x1024:</p>

<p><a href="https://s18.postimg.org/vta0qfd5l/2809583a0f43627d0fc1b428863b3faa.jpg" rel="nofollow">https://s18.postimg.org/vta0qfd5l/2809583a0f43627d0fc1b428863b3faa.jpg</a></p>

<p>This is the code I have used:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>h2 {
  margin: 0;
}
body {
  background-color: #121212;
  background-image: url("https://app.box.com/shared/static/vgfs65li424fk8h4n5e23pm7070yrewq.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-height: auto;
  max width: 1200px;
}
table {
  display: inline-block;
  position: absolute;
  max-width: 350px;
  max-height: 265px;
  border: 5px ridge yellow;
  top: 0;
  bottom: 0;
  margin: auto;
  left: 0;
  right: 0;
  padding-left: 90px;
  padding-right: 90px;
  background: rgba(255, 255, 255, 0.8);
}
div {
  text-align: center;
  align: center;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
  &lt;table&gt;

  &lt;/table&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>So, any idea what I can improve to "nail it"? I've noticed that if I add more to max-width complete box moves to the left. Maybe if I can solve this, I would solve the first problem as well?</p>

<p>This question is unique because I can't use percentage in order to align table properly, so I just want to know if this is possible at all.</p>

<p>Thanks!</p>

<p>thank you for your help, but I talked to a friend meanwhile and we came up to satisfying solution, so here's the final code and what we did</p>

<ol>
<li>I removed the table from the body and other non-necessary items (forgive me, as I'm a newbie)</li>
<li>Instead of max height and width we used height and width - we had to fine tune height so that all browsers can display content properly and I have tested this out on cellphone, iPad, several monitors, everything is shown in a way I would like to.</li>
<li>Except for IE8... but honestly, it doesn't matter :)</li>
</ol>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;style&gt;h2 {
  margin: 0;
}
body {
  background-color: #121212;
  background-image: url("https://app.box.com/shared/static/vgfs65li424fk8h4n5e23pm7070yrewq.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
}
.FormBody {
  display: inline-block;
  position: absolute;
  width: 380px;
  height: 305px;
  border: 5px ridge gold;
  top: 0;
  bottom: 0;
  margin: auto;
  left: 0;
  right: 0;
  padding-left: 90px;
  padding-right: 90px;
  text-align: center;
  background: rgba(255, 255, 255, 0.8);
}
&lt;/style&gt;</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
&lt;meta charset="utf-8"&gt;

&lt;head&gt;
  &lt;title&gt;CTLServer REGISTRACIJA&lt;/title&gt;
&lt;/head&gt;
&lt;script src="/md5.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script&gt;
  function makeHash() {
    a = document.getElementById('serial').value;
    a = a.replace(/^\s+/, '').replace(/\s+$/, '').replace(/-/g, '').toUpperCase();
    if (!a.match(/^[A-Z0-9]{20}$/)) {
      alert('Neispravan serijski broj.');
      return false;
    }
    document.getElementById('serial').value = a;
    while (a.length &lt; 36) {
      a += '\0';
    }
    u = document.getElementById('username').value;
    u = u.replace(/^\s+/, '').replace(/\s+$/, '');
    if (u.length &lt; 3 || !u.match(/^[0-9a-zA-Z]+$/)) {
      alert('Zabranjeno ime za korisnika - dozvoljeno 3-36 alfa-numeriÄka znaka (0-9 | a-z | A-Z).');
      return false;
    }
    p = document.getElementById('password').value;
    if (p.length &lt; 3) {
      alert('Lozinka je kratka - minimum 3 alfa-numeriÄka znaka (0-9 | a-z | A-Z)');
      return false;
    }
    document.getElementById('hash').value = hex_md5(a + u + '-' + p);
    return true;
  }
&lt;/script&gt;
&lt;div class="FormBody"&gt;
  &lt;br /&gt;
  &lt;h2&gt;&lt;u&gt;â¢ CTLServer REGISTRACIJA â¢&lt;/h2&gt;
  &lt;/u&gt;
  &lt;strong&gt;&lt;a href="https://app.box.com/shared/static/krtchlikkjw48u21aywx"&gt;LINK za HOST&lt;/a&gt;&lt;br /&gt;&lt;/strong&gt;
  &lt;br /&gt;
  &lt;form name="registration" action="/register" method="POST"&gt;
    &lt;input type="hidden" name="nonce" id="nonce" value="%(nonce)s" /&gt;
    &lt;input type="hidden" name="hash" id="hash" size="32" value="" /&gt;
    &lt;strong&gt;Serijski Broj:&lt;/strong&gt;
    &lt;br /&gt;
    &lt;input type="text" name="serial" id="serial" size="40" value="%(serial)s" onkeydown="if (event.keyCode == 13) {document.getElementById('btnGen').click(); return false;}" /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;strong&gt;KorisniÄko Ime:&lt;/strong&gt;
    &lt;br /&gt;
    &lt;input type="text" name="user" id="username" size="40" value="%(username)s" onkeydown="if (event.keyCode == 13) {document.getElementById('btnGen').click(); return false;}" /&gt;
    &lt;br /&gt;
  &lt;/form&gt;
  &lt;strong&gt;Lozinka:&lt;/strong&gt;
  &lt;br /&gt;
  &lt;input type="password" id="password" size="40" value="" onkeydown="if (event.keyCode == 13) {document.getElementById('btnGen').click(); return false;}" /&gt;
  &lt;br /&gt;
  &lt;p&gt;
    &lt;input class="button" type="button" id="btnGen" value="Registruj se" onclick="if (makeHash()) {document.forms['registration'].submit();}" /&gt;
  &lt;/p&gt;
&lt;/div&gt;

&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>So once again, thanks for all your help, especially @zer00ne I will definitely read your post briefly couple of times as I think there is a lot I can understand from there. And as a matter of fact I think I'm gonna try other methods as well, just to make it work in case I'm gonna need them at some point.</p>

python html css center