@import url('https://fonts.googleapis.com/css2?family=Titillium+Web&display=swap');
*{
margin: 0;
padding: 0;
font-family: TitilliumWeb,sans-serif;
box-sizing: border-box;
}
body{
background-color: rgb(149, 101, 82);
padding: 0 10px;
}
.titl{
display: block;
font-size: 20px;
font-weight:bold;
text-align: center;
text-transform: uppercase;
margin-bottom: 20px;
margin-top: 7px;
}
form {
width: 100%;
}
#fmr{
box-shadow: 2px 2px 4px 3px rgba(36, 36, 36, 0.704);
background-color: rgb(181, 175, 169);
width: 50%;
max-width: 500px;
margin: 50px auto;
padding: 25px;
text-align: center;
border-radius: 8px;
}
.input_fld{
margin-bottom: 17px;
margin-right: 5px;
margin-left: 0;
display: flex;
align-items: center;
}
.input_fld > label{
display: flex;
width: 200px;
margin-right: 40px;
font-size: 17px;
}
.slgn{
position: relative;
width: 100%;
height: 5vh;
}
.slgn select{
appearance:none;
box-shadow: 2px 2px 4px rgba(36, 36, 36, 0.558);
outline: none;
width: 100%;
padding: 8px 10px;
font-size: 15px;
border: 1px solid #d5dbd9;
border-radius: 3px;
}
.slgn:before{
content: "";
position: absolute;
top: 13px;
right: 10px;
border: 8px solid;
border-color: #d5dbd9 transparent transparent ;
pointer-events: none;
}
.slgn select:focus {
border: 3px solid #fec107;
animation: 0.8s ease;
}
input[type="text"] {
box-shadow: 2px 2px 4px rgba(36, 36, 36, 0.558);
width: 100%;
margin: 5px auto;
height: 6vh;
background-color: none;
border: none;
outline: none;
padding: 8px 10px;
border-radius: 3px;
font-size: 15px;
transition: all 0.3s ease;
}
input[type="text"]:focus {
border: 3px solid #fec107;
animation: 0.8s ease;
}
input[type="tel"] {
box-shadow: 2px 2px 4px rgba(36, 36, 36, 0.558);
text-decoration: none;
margin: 5px auto;
width: 100%;
background-color: none;
border: none;
outline: none;
height: 5.5vh;
padding: 8px 10px;
border-radius: 3px;
font-size: 16px;
transition: all 0.3s ease;
}
input[type="tel"]:focus {
border: 3px solid #fec107;
transition: 0.8s ease;
}
input[type="email"]{
box-shadow: 2px 2px 4px rgba(36, 36, 36, 0.558);
margin: 5px auto;
width: 100%;
background-color: none;
border: none;
outline: none;
height: 6vh;
padding: 8px 10px;
border-radius: 3px;
font-size: 15px;
transition: all 0.3s ease;
}
input[type="email"]:focus {
border: 3px solid #fec107;
transition: 0.8s ease;
}
.input_fld textarea{
box-shadow: 2px 2px 4px rgba(36, 36, 36, 0.558);;
margin: 5px auto;
width: 100%;
background-color: none;
border: none;
outline: none;
height: 88px;
resize: none;
border-radius: 3px;
font-size: 17px;
padding:10px 13px;
}
.input_fld textarea:focus {
border: 3px solid #fec107;
transition: 0.8s ease;
}
input[type="checkbox"], .chckbx .fa-square-check {
display: none;
}
.fa-square{
font-size: 1.3em;
}
input[type="checkbox"]:checked ~ .fa-square-check {
display: inline-block;
font-size: 1.3em;
}
input[type="checkbox"]:checked ~ .fa-square {
display: none;
}
.chckbx i:focus {
border: 3px solid #fec107;
transition: 0.8s ease;
}
i {
margin-right: 3px;
}
.ttbx{
cursor: pointer;
font-size: 18.8px;
margin-left: 5px;
margin-right: 74px;
}
.input_fld .btn{
width: 100%;
padding: 9px 11px;
font-size: 19px;
border: 0px;
background: #6b8669;
color: #343533;
cursor: pointer;
border-radius: 4px;
outline: none;
margin: 10px 0 auto;
}
.input_fld:last-child{
margin-bottom: 0;
}
@media (max-width:520px) {
#fmr form .input_fld{
flex-direction: column;
align-items: flex-start;
}
}
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>This</title>
<link rel="stylesheet" href="style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"/>
<body>
<div id="fmr">
<div class="titl">Registration Form</div>
<form action="info.php">
<div class="input_fld">
<label>First Name : </label>
<input type="text" />
</div>
<div class="input_fld">
<label>Last name : </label>
<input type="text" />
</div>
<div class="input_fld">
<label> Email Address : </label>
<input type="email" />
</div>
<div class="input_fld">
<label>Gender : </label>
<div class="slgn">
<select name="gender" id="gender">
<option value="select">Select</option>
<option value="male">Male</option>
<option value="female">Female</option>
</select>
</div>
</div>
<div class="input_fld">
<label for="idc"> Phone Number:</label>
<input type="tel" pattern="[+]{0-2}{0-12}" />
</div>
<div class="input_fld">
<label for="ide"> Address : </label>
<textarea class="address"></textarea>
</div>
<div class="input_sl">
<label class="chckbx">
<input type="checkbox" />
<i class="fa-regular fa-square"></i>
<i class="fa-solid fa-square-check"></i>
<span class="ttbx"> Do you agree to the terms and conditions </span>
</label>
</div>
<div class="input_fld">
<input type="submit" value="Register" class="btn" />
</div>
</form>
</div>
</body>
</html>