-
Notifications
You must be signed in to change notification settings - Fork 20
homework1: Jessi Yao #20
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Document</title> | ||
| <link rel="stylesheet" href="style1.css"> | ||
| </head> | ||
| <body> | ||
| <div class="left-panel"> | ||
| <h1>Welcome to Paint Quote System</h1> | ||
| <hr> | ||
| <p> | ||
| Consequat adipisicing ea do labore irure adipisicing occaecat cupidatat excepteur duis mo | ||
| </p> | ||
| </div> | ||
|
|
||
| <div class="right-panel"> | ||
| <form action="submit" method="post"> | ||
| <div> | ||
| <h2>Sign Up</h2> | ||
| <p class="title-line">Enter details to create your account</p> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="username">Your name</label> | ||
| <input type="text" id="username" placeholder="Enter your name"> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="phone">Phone number</label> | ||
| <input type="text" id="phone" placeholder="Enter your phone number"> | ||
| </div> | ||
|
|
||
| <div> | ||
| <label for="account">Dulux account</label> | ||
| <input type="text" id="account" placeholder="Enter your Dulux account"> | ||
| </div> | ||
|
|
||
| <button class="preliminary-button">Sign up</button> | ||
|
|
||
| <p class="form-footer"> | ||
| Already have an account? | ||
| <a href="login.html">Sign in</a> | ||
| </p> | ||
| </form> | ||
| </div> | ||
| </body> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| *{ | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body{ | ||
| min-height: 100vh; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 180px; | ||
| padding-left: 170px; | ||
| padding-right: 150px; | ||
|
|
||
| background-image: url("background.png"); | ||
| background-size: cover; | ||
| background-repeat: no-repeat; | ||
| } | ||
|
|
||
| .left-panel{ | ||
| flex: 1; | ||
| width: 100%; | ||
|
Comment on lines
+22
to
+23
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. flex: 1 的作用是让子元素平分父容器的可用空间, width不需要设置 |
||
| max-width: 460px; | ||
| margin-left: -40px; | ||
| margin-top: -35px; | ||
|
Comment on lines
+25
to
+26
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. very bad practice to move the position of the left-section to the place you want, margin it is the distance between element, not to move an element |
||
| } | ||
|
|
||
| .left-panel h1{ | ||
| font-size: 27px; | ||
| margin-bottom: 16px; | ||
| color: rgb(47, 74, 120); | ||
| } | ||
|
|
||
| .left-panel hr{ | ||
| width: 100%; | ||
| max-width: 430px; | ||
| border: none; | ||
| border-top: 2px solid rgb(47, 74, 120); | ||
| margin: 12px 0 16px 0; | ||
| } | ||
|
|
||
| .left-panel p{ | ||
| line-height: 1.7; | ||
| color: rgb(47, 74, 120); | ||
| } | ||
|
|
||
| .right-panel{ | ||
| flex: 1; | ||
| width: 100%; | ||
| max-width: 500px; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| form{ | ||
| width: 100%; | ||
| background-color: white; | ||
| padding: 30px 30px; | ||
| border-radius: 10px; | ||
| border: 1px solid #ddd; | ||
| box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); | ||
| } | ||
|
|
||
| form h2 { | ||
| text-align: center; | ||
| } | ||
|
|
||
| .title-line{ | ||
| text-align: center; | ||
| color: #777; | ||
| margin-bottom: 40px; | ||
| } | ||
|
|
||
| label{ | ||
| display: block; | ||
| margin-top: 20px; | ||
| margin-bottom: 6px; | ||
| } | ||
|
|
||
| input{ | ||
| display: block; | ||
| width: 100%; | ||
| padding: 14px 16px; | ||
| border: 1px solid #ccc; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| .preliminary-button{ | ||
| display: block; | ||
| width: 100%; | ||
| padding: 16px; | ||
| margin-top: 20px; | ||
| font-size: 18px; | ||
|
|
||
| background-color: #3f81b3; | ||
| color: #ffffff; | ||
|
|
||
| border: none; | ||
| border-radius: 6px; | ||
| } | ||
|
|
||
| .form-footer { | ||
| margin-top: 16px; | ||
| text-align: center; | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| .form-footer a { | ||
| text-decoration: none; | ||
| } | ||
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.
all the input elements miss name attribute, this is very important