JSFiddle - React, Tailwind, and code Playground

by markusr

HTML

<html>
<head>
    <style type="text/css">
    #btn
    {
        background-color:#FF0000;
        width:100px;
        height:30px;
    }

    #comp
    {
        background-color:#00FFFF;
        width:200px;
        height:200px;
    }

    #container
    {
        width:500px;
        height:300px;
        overflow:auto;
        background-color:#CCCCCC;           

        text-align:center;
    }

    .contain
    {

        background-color:#AAAAAA;
        float:left;
        width:50%;
        height:100%;
        position: relative;
    }

    .elem
    {
        position: absolute;
        top:0;
        bottom:0;
        left:0;
        right:0;
        margin:auto;
    }
    </style>
</head>
<body>
    <div id="container">
        <div class="contain">
            <div class="elem" id="comp">Component in Here</div>
        </div>
        <div class="contain">        
            <div class="elem" id="btn">Button</div>
        </div>
    </div>
</body>
</html>