Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 56 additions & 26 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My form exercise</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!-- try writing out the requirements first-->
</form>

</main>
<footer>
<!-- change to your name-->
<h2>By HOMEWORK SOLUTION</h2>
</footer>
</body>

</html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required />
<label for="email">Email:</label>
<input type="email" id="email" name="email" required />
<label for="color">Color:</label>
<select id="color" name="color" required>
<option value="">Please select a color</option>
<option value="red">Red</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
<label for="size">Size:</label>
<select id="size" name="size" required>
<option value="">Please select a size</option>
<option value="XS">XS</option>
<option value="S">S</option>
<option value="M">M</option>
<option value="L">L</option>
<option value="XL">XL</option>
<option value="XXL">XXL</option>
</select>
<label for="delivery-date"
>Delivery date (within next 4 weeks):</label
>
<input
type="date"
id="delivery-date"
name="delivery-date"
min="2023-05-07"
max=""
required
/>
<button type="submit">Submit</button>
</form>
</form>
</main>
<footer>
<p style="color: aqua">By Stella Del Mar</p>
</footer>
</body>
</html>
78 changes: 78 additions & 0 deletions Form-Controls/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
form {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-family: sans-serif;
background-color: #f2f2f2;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);

}

h1, footer {
text-align: center;
}

label {
margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
select {
font-size: 1rem;
padding: 10px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
width: 100%;
max-width: 300px;
}

select {
appearance: none;
background-color: #fff;
background-position: right 10px center;
background-repeat: no-repeat;
}

select:focus {
outline: none;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

input[type="date"] {
font-size: 1rem;
padding: 10px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
width: 100%;
max-width: 300px;
appearance: none;
background-color: #fff;
background-position: right 10px center;
background-repeat: no-repeat;
}

input[type="date"]:focus {
outline: none;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

button[type="submit"] {
background-color: #007bff;
color: #fff;
font-size: 1rem;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:hover {
background-color: #0069d9;
}