Skip to main content

Form validation

Big O

HTML Classic + React JS / TS​

body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f8f8f8;
}

.app-container {
text-align: center;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 80%;
max-width: 800px;
}

h1 {
margin-bottom: 20px;
}

form {
margin-bottom: 20px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="submit"],
button {
padding: 10px;
font-size: 14px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 400px;
}

input[type="submit"],
button {
background-color: #4caf50;
color: white;
cursor: pointer;
transition: background-color 0.3s;
}

input[type="submit"]:hover,
button:hover {
background-color: #45a049;
}

table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}

th,
td {
border: 1px solid #ddd;
padding: 10px;
text-align: center;
}

th {
background-color: #f2f2f2;
}

tr:nth-child(even) {
background-color: #f9f9f9;
}

tr:hover {
background-color: #f1f1f1;
}

.error {
color: red;
font-size: 14px;
margin-top: 10px;
display: none;
}