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
39 changes: 34 additions & 5 deletions Form-Controls/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,51 @@
<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="name" required pattern=".*\S.*\S.*"/>
</div>
<div>
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
</div>
<div>
<label for="color">Choose T-shirt color</label>
<select id="color" name="color" required>
<option value="">Select a color</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
</div>
<div>
<label for="size">Size</label>
<select id="size" name="size" required>
<option value="">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>
<button type="submit">Submit</button>
</div>
</form>
</main>
<footer>
<!-- change to your name-->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment was an instruction from the starter file. Now you've done it, it can go.

<p>By HOMEWORK SOLUTION</p>
<p>By Shirin Panahian</p>
</footer>
</body>
</html>
13 changes: 13 additions & 0 deletions Form-Controls/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
input,
select,
button{
min-height: 40px;
padding: 10px;
font-size: 16px;
}
button{
padding: 12px,24px;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's a comma between the two values, which isn't valid CSS, so the browser drops this rule and the button keeps the 10px padding from the rule above. What separates values in a shorthand property?

}
form > div{
margin-bottom: 16px;
}
Loading