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
54 changes: 46 additions & 8 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,60 @@
<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>

<div>
<label for="mail">Email:</label>
<input type="email" id="mail" name="customers_email" required />

<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>

<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>

<div class="button">
<button type="submit">Submit</button>
</div>
</form>
</main>
<footer>
<!-- change to your name-->
<p>By HOMEWORK SOLUTION</p>
</footer>
<footer>Talia Kucuk</footer>
</body>
</html>
55 changes: 55 additions & 0 deletions Form-Controls/style.css
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the styling of the form. It looks nice

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;
}