HTML Element Style How to - Center full width/height


We would like to know how to center full width/height.


<!DOCTYPE html>
<style type='text/css'>
html {<!--   w w w  .ja v a 2 s .  c om-->
  min-height: 100%;
  height: 100%;

body {
  height: 100%;
  margin: 0;

.panel {
  background: #333;
  color: #fff;
  width: 100%;
  height: 100%;
  display: table;

.panel .inner {
  padding: 40px;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
  <div class="panel">
    <div class="inner">hi there</div>

The code above is rendered as follows: