JSFiddle - React, Tailwind, and code Playground
by Sergei
HTML
<div class="fixed-overlay fixed-overlay__modal">
<div class="modal">
<div class="modal_container">
<h2 class="modal_heading">Liitu Äripäeva Akadeemia uudiskirjaga!</h2>
<input type="search"" name="search"/>
<input type="subm"
</div>
</div>
</div>
CSS
* {
box-sizing: border-box;
}
.fixed-overlay {
position: fixed;
overflow: auto;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.fixed-overlay__modal {
text-align: center;
white-space: nowrap;
}
.fixed-overlay__modal::after {
display: inline-block;
vertical-align: middle;
width: 0;
height: 100%;
content: '';
}
.modal {
display: inline-block;
vertical-align: middle;
}
.modal_container {
margin: 50px;
padding: 20px;
text-align: left;
white-space: normal;
background-color: #fff;
color: #000;
border-radius: 5px;
color: red;
}
JavaScript
http://jsfiddle.net/designsergo/5gfj2814/2/#