-
-
Notifications
You must be signed in to change notification settings - Fork 546
Cape Town | 26-Sep-ITP | Raees Stevens | Sprint 1 | Form Controls #1518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RaeesStevens
wants to merge
45
commits into
CodeYourFuture:main
Choose a base branch
from
RaeesStevens:feature/form-controls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−21
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
7b41ae7
Added form code
RaeesStevens e8ae82b
created style.css file and linked to html
RaeesStevens 8ae5858
added a : after Customer email
RaeesStevens d01406b
added colon after customer email
RaeesStevens 7583afd
updated background colour on CSS
RaeesStevens 6314e87
updated labels and body on CSS
RaeesStevens 831f71a
Updated CSS with select and input fields
RaeesStevens 97df358
changed label font color
RaeesStevens 031dd37
added fieldset styling
RaeesStevens 9823b8e
restarted CSS with heading styling
RaeesStevens 2fca7b5
Testing body and heading styling
RaeesStevens 6a29c30
updated body in CSS
RaeesStevens 70180cc
added legend and fieldset in CSS
RaeesStevens 6406563
trying form CSS layout
RaeesStevens 9e88ab5
centered h1, added button colors
RaeesStevens 1ed6d74
update special label
RaeesStevens 8c3c805
update labels on html
RaeesStevens 8d3ea27
made label font size small
RaeesStevens 942d555
final updates
RaeesStevens ab37c3b
added pattern for two non-space characters
RaeesStevens a0b0cba
updated read.me
RaeesStevens 4f2424f
updated read me and CSS
RaeesStevens dfba1c7
Added inline-blockd isplay to size
RaeesStevens 9cd31c8
Updated submit buttom on html
RaeesStevens eaa2c1e
Added size label
RaeesStevens 5f4166a
Testing frid display for form
RaeesStevens 38a0689
updated html with div classes
RaeesStevens 783c8ce
Added margin-bottom to classes in CSS
RaeesStevens 8b2150b
Added size-row to CSS
RaeesStevens a0c9d78
Updted css with form border and fieldset margin and min-width
RaeesStevens d40d37b
updated css
RaeesStevens 71dc183
Added styling for input element for submit button
RaeesStevens 3e12963
add container class in html adn CSS
RaeesStevens f508efd
added bottom-margin to size-row
RaeesStevens 6d780ec
centered p
RaeesStevens ea60e41
made border for form larger
RaeesStevens 39d6f9a
Added max width for form
RaeesStevens dadd27a
updated CSS
RaeesStevens a108fe8
remvoed amx-width from form
RaeesStevens 52ff742
updated max-width of container to 500px
RaeesStevens 4c661e4
fix footer p naming on css
RaeesStevens 80ab52b
added box-sizing to form
RaeesStevens e7daaa2
updated form display
RaeesStevens 3f082e9
updated container to wrap entire form in html
RaeesStevens cfe2fb3
updated font size
RaeesStevens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,22 +6,67 @@ | |
| <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> | ||
| <div class="container"> | ||
| <form> | ||
| <!-- write your html here--> | ||
| <!-- | ||
| try writing out the requirements first as comments | ||
| this will also help you fill in your PR message later--> | ||
| </form> | ||
| <div class="field-row"> | ||
| <label for="name">Customer Name:</label> | ||
| <input type="text" id="name" minlength="2" pattern=".*\S.*\S.*" required> | ||
|
|
||
| <label for="email">Customer Email:</label> | ||
| <input type="email" id="email" name="email" required> | ||
| </div> | ||
|
|
||
| <fieldset> | ||
| <legend>T-shirt color:</legend> | ||
|
|
||
| <div class="color-options"> | ||
| <input type="radio" id="blue" name="color" value="blue" required> | ||
| <label for="blue">Blue</label> | ||
|
|
||
| <input type="radio" id="black" name="color" value="black" required> | ||
| <label for="black">Black</label> | ||
|
|
||
| <input type="radio" id="grey" name="color" value="grey" required> | ||
| <label for="grey">Grey</label> | ||
| </div> | ||
|
Comment on lines
+34
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use an AI tool to find out how the code on lines 35-42 could be simplified? |
||
|
|
||
| <div class="size-row"> | ||
| <label for="size">Size</label> | ||
| <select id="size" name="size" required> | ||
|
|
||
| <option value="">--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> | ||
| </div> | ||
|
|
||
| <input type="submit" value="Submit"> | ||
|
|
||
| </fieldset> | ||
| </div> | ||
|
|
||
| </form> | ||
| </div> | ||
| </main> | ||
| <footer> | ||
| <!-- change to your name--> | ||
| <p>By HOMEWORK SOLUTION</p> | ||
| <p>By Raees Stevens</p> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| h1 { | ||
| text-align: center; | ||
| } | ||
|
|
||
| footer p { | ||
| text-align: center; | ||
| } | ||
| .container { | ||
| max-width: 700px; | ||
| margin: 2em auto; | ||
| padding: 1em; | ||
| font-size: 1.2em; | ||
| } | ||
|
|
||
| form { | ||
| display: block; | ||
| border: 1px solid #3333; | ||
| border-radius: 1em; | ||
| box-sizing: border-box; | ||
| width: 100%; | ||
| } | ||
|
|
||
| .field-row { | ||
| margin-bottom: 1em; | ||
| display: block; | ||
| } | ||
|
|
||
| .color-options { | ||
| margin-bottom: 0.75em; | ||
| } | ||
| .size-row { | ||
| margin-top: 0.5em; | ||
| margin-bottom: 0.5em; | ||
| } | ||
|
|
||
| input[type="submit"] { | ||
| display: block; | ||
| margin-top: 0.75em; | ||
| } | ||
|
|
||
| fieldset { | ||
| margin: 2em 5; | ||
| min-width:250px; | ||
| } | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is not consistent.
Suggestion:
Resource: Visual Studio Code - Formatting