JSFiddle - React, Tailwind, and code Playground
HTML
<form method="#" action="#" id="contact-form">
<fieldset>
<legend>Don't Be Shy Just Say Hi To Me</legend>
<p>
<label for="firstName">First Name</label>
<input type="text" name="first-name" placeholder="John" id="firstName">
</p>
<p>
<label for="lastName">Last Name</label>
<input type="text" name="last-name" placeholder="David" id="lastName">
</p>
<p>
<label for="email">Email</label>
<input type="emial" placeholder="JohnDavid@.com" id="email">
</p>
<p>
<label for="Phone">Phone</label>
<input type="tel" id="Phone" name="phone-number" placeholder="900-285-7980">
</p>
<textarea name="message" id="message" placeholder="Hi there!"></textarea>
<input type="submit" name="send" id="sendMessage" value="Send">
</fieldset>
</form>
CSS
*{box-sizing:border-box;}
label {
float:left;
text-align:right;
width:100px;
margin-right:15px;
font-weight:bold;
color:red;
vertical-align:middle;
clear:both;
padding: 10px 0;
/*display:inline-block;*/
}
#contact-form {
margin:0 auto;
width:650px;
}
/*When using the input[type] is important to keep them close together in order for it to work*/
#contact-form input[type=text],
#contact-form input[type=emial],
#contact-form input[type=tel] {
width:300px;
margin-bottom:8px;
border-radius:5px;
border:1px solid #ccc;
padding:10px 15px;
}
#contact-form input[type=tel] {
width:150px;
}
#contact-form input[type=submit] {
display:block; // push the submit button nav-down
float:right;
}
#contact-form textarea {
width:600px;
height:300px;
resize:none;
border:3px solid #ccc;
border-radius:5px;
color:lightblue;
}
#contact-form fieldset {
width:650px;
border:none;
}