JSFiddle - React, Tailwind, and code Playground
by NGLN
HTML
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="none">
<form method="" action="" >
<fieldset>
<legend>Personal information:</legend>
<div class="wrap">
<div>
<label for="firstname">First name:</label>
<span><input name="firstname" id="firstname" type="text" size="20" /></span>
</div>
<div>
<label for="middlename">Middle name:</label>
<span><input id="middlename" name="middlename" type="text" size="10" /></span>
</div>
<div>
<label for="lastname">Last name:</label>
<span><input name="lastname" id="lastname" type="text" size="30" /></span>
</div>
<div>
<label for="nick">What is your nick-name?</label>
<span><input name="nick" id="nick" type="text" size="5" /></span>
</div>
</div>
</fieldset>
</form>
</div>
CSS
html, body, form, fieldset, legend, div, label, input {padding: 0; margin: 0;}
body {
padding: 2em;
}
.column {
background: #666;
float: right;
width: 30%;
padding: 1em;
}
legend {
background: #aaa;
width: 100%;
padding: .5em;
}
fieldset {
background: #999;
}
.wrap {
background: #ccc;
width: 60%;
margin-left: 40%;
}
.wrap div {
position: relative;
height: 2em;
line-height: 2em;
width: 1px;
}
label {
position: absolute;
right: .25em;
text-align: right;
white-space: nowrap;
}
span {
position: absolute;
left: .5em;
margin-left: .25em;
}