Skip to content
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
49 changes: 43 additions & 6 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,59 @@
<title>My form exercise</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Product Pick</h1>
</header>
<main>
<form>
<!-- write your html here-->
<!--
try writing out the requirements first as comments
this will also help you fill in your PR message later-->
<div>
<label for="name">Name:</label>
<input type="text" id="name" name="customers_name" required pattern=".*\S.*\S.*">
</div>
<!-- 1. What is the customer's name? I must collect this data and
it contains at least two non-space characters. -->
<div><label for="mail">Email:</label>
<input type ="email" id="mail" name="customers_email" required></div>
<!-- 2. What is the customer's email? I must make sure the email is valid.
Email addresses follow a consistent pattern.-->
<div>
<label for="colour">Colour:</label>

<select id="colour" name="tshirt_colour" required>
<option value="" selected disabled>Choose a colour</option>
<option value="pink">Pink</option>
<option value="yellow">Yellow</option>
<option value="black">Black</option>
</select>
</div>
<!--3. What colour should this T-shirt be? I must provide 3 options.
How will I ensure they do not choose other colours?-->
<div>
<label for="size">Size:</label>

<select id="size" name="tshirt_size" required>
<option value="" selected disabled>Choose 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>
</div>
<!-- 4. What size does the customer want? I must provide the following 6 options:
XS, S, M, L, XL, XXL-->
<div class="button">
<button type="submit">Submit</button>
</div>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
Talia Kucuk
</footer>
</body>
</html>
55 changes: 55 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
}

header,
footer {
text-align: center;
padding: 1rem;
}

main {
display: flex;
justify-content: center;
}

form {
background-color: white;
padding: 2rem;
margin-top: 2rem;
width: 320px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form div {
margin-bottom: 1rem;
}

label {
display: block;
margin-bottom: 0.4rem;
font-weight: bold;
}

input,
select,
button {
width: 100%;
padding: 0.6rem;
box-sizing: border-box;
}

button {
background-color: black;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

button:hover {
background-color: #333;
}
Loading