JSFiddle - React, Tailwind, and code Playground

by Vladimir Sobolev

HTML

<!DOCTYPE html>
<html>
<head>
<title>Test Task - Anthony Singh</title>
<link href='http://fonts.googleapis.com/css?family=Economica' rel='stylesheet' type='text/css'>
<!-- This fix is for anything less than IE8 -->
<!--[if lt IE 8]>
<style>
#box { position: absolute; top: 50%;}
#box p {position: relative; top: -50%}
</style>
<![endif]-->
</head>
<body>
<div id="box">
<p>Hello World</p>
</div>
</body>
</html>

CSS

html, body {
    height:100%;
    width:100%;
}
#box {
    width: 290px;
    height: 90px;
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -150px;
    position: absolute;
    display: table;
    background-color: #F00;
    border: 5px solid #000;
    font-family: 'Economica', sans-serif;
    font-size: 30px;
    color: #fff;
    text-align: center;
}
p {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}