JSFiddle - React, Tailwind, and code Playground

by MadhawaMB

HTML

<div id="formholder1">

			<form>
				<div class="single-field">
				<label for="Username">Username:</label>
					<input name="Name" type="text"></input>
				</div>

				<div class="single-field">
					<label for="Password">Password:</label>
					<input name="Password" type="text"></input>

				</div>
				<input type="submit" value="Login">
			</form>	
		</div>

CSS

form{
	position: absolute;
	left: 50%;
	color: white;
	margin-left: -180px;
	padding: 15px 30px 15px 30px;
	background-color: #26004d;
	border-radius: 7px;
	margin-top: 10px;
	width: 300px;
}

label{
	float: left;
	text-align: right;
	margin-right: 15px;
	width: 100px;
}
input[type="text"]:focus {
	border: 2px solid #862d59;
}
input:focus {
	border: 2px solid red;
}

input[type="submit"]{
 width: 50%;
 background-color: #862d59;
 color: white;
 margin-top: 5px;
 padding: 12px 12px;
 border: none;
 margin-left:-10px;
 cursor: pointer;
}

input[type="text"]{
	width: 100%;
	padding:  12px 12px;
	margin: 4px 0;
	border: 1px solid #ccc;
	border-radius: 6px;
  margin-left:-15px;

	//box-sizing: border-box;

}