-
Notifications
You must be signed in to change notification settings - Fork 38
Design #21
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?
Design #21
Changes from all commits
6ef36f0
516f048
d87ba4c
0cc5391
3f6393f
ca11904
53f2364
1ba3230
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 |
|---|---|---|
| @@ -1,52 +1,176 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
|
|
||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device --> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <!-- displays site properly based on user's device --> | ||
|
|
||
| <link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png"> | ||
|
|
||
| <title>Frontend Mentor | Newsletter sign-up form with success message</title> | ||
|
|
||
| <!-- Feel free to remove these styles or customise in your own stylesheet 👍 --> | ||
| <style> | ||
| .attribution { font-size: 11px; text-align: center; } | ||
| .attribution a { color: hsl(228, 45%, 44%); } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| .attribution { | ||
| font-size: 11px; | ||
| text-align: center; | ||
| } | ||
|
|
||
| .attribution a { | ||
| color: hsl(228, 45%, 44%); | ||
|
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. I recommend using CSS variables — they’re easier to work with and are generally considered best practice. |
||
| } | ||
|
|
||
| .page { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| height: 100vh; | ||
| width: 100vw; | ||
|
|
||
| } | ||
|
|
||
| .grey-ground { | ||
| display: flex; | ||
| background-color: #36384D; | ||
| justify-content: center; | ||
| align-items: center; | ||
| width: 60vw; | ||
| height: 80vh; | ||
| } | ||
|
|
||
| .white-ground { | ||
| display: flex; | ||
| flex-direction: row; | ||
| justify-content: space-around; | ||
| background-color: white; | ||
| align-items: center; | ||
| width: 40vw; | ||
| height: 50vh; | ||
| border-radius: 12px; | ||
| padding: 25px 5px; | ||
|
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. Its better to work with rem. |
||
| } | ||
|
|
||
|
|
||
| <!-- Sign-up form start --> | ||
| .photo { | ||
| width: 45%; | ||
| height: 100%; | ||
| } | ||
|
|
||
| Stay updated! | ||
| .photo-item { | ||
| width: 100%; | ||
| height: 100%; | ||
| object-fit: contain; | ||
| } | ||
|
|
||
| Join 60,000+ product managers receiving monthly updates on: | ||
| .text { | ||
| width: 45%; | ||
| height: 100%; | ||
| text-align: left; | ||
| } | ||
|
|
||
| Product discovery and building what matters | ||
| Measuring to ensure updates are a success | ||
| And much more! | ||
| .title { | ||
| font-weight: bold; | ||
| font-size: 28px; | ||
| margin-top: 20px; | ||
|
|
||
| Email address | ||
| email@company.com | ||
| } | ||
|
|
||
| Subscribe to monthly newsletter | ||
| .sub-title { | ||
| margin-top: 20px; | ||
| font-size: 12px; | ||
|
|
||
| <!-- Sign-up form end --> | ||
|
|
||
| <!-- Success message start --> | ||
| } | ||
|
|
||
| Thanks for subscribing! | ||
| .line-1 { | ||
| display: flex; | ||
| flex-direction: row; | ||
| font-size: 10px; | ||
| margin-top: 10px; | ||
| align-items: center; | ||
| } | ||
|
|
||
| A confirmation email has been sent to ash@loremcompany.com. | ||
| Please open it and click the button inside to confirm your subscription. | ||
| .text-1 { | ||
| display: flex; | ||
| align-items: center; | ||
| text-align: end; | ||
| margin-left: 7px; | ||
| } | ||
|
|
||
| Dismiss message | ||
| .email-title { | ||
| display: flex; | ||
| flex-direction: row; | ||
| margin-top: 20px; | ||
| font-size: 10px; | ||
| } | ||
|
|
||
| <!-- Success message end --> | ||
|
|
||
| <div class="attribution"> | ||
| .field { | ||
| display: flex; | ||
| flex-direction: row; | ||
| width:250px; | ||
|
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. Coniser that its not It’s not recommended — and even considered incorrect — to use fixed pixel sizes for a div. If the user changes their screen size, the entire layout can break |
||
| height: 35px; | ||
| } | ||
| .btn{ | ||
| display: flex; | ||
| color:rgb(236, 229, 229); | ||
| background-color: #232840; | ||
| border-radius: 3px; | ||
| justify-content: center; | ||
| align-items: center; | ||
| margin-top: 20px; | ||
| width:250px; | ||
|
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. Same comment as before about pixels, try to use % or Vh and Vw |
||
| height: 35px; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
| <div class="page"> | ||
| <div class="grey-ground"> | ||
|
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. Try to use more logical names. grey-ground class its most commonly about colors and not about roles in my page. |
||
| <div class="white-ground"> | ||
| <div class="text"> | ||
| <div class="title"> Stay updated!</div> | ||
| <div class="sub-title"> Join 60,000+ product managers receiving monthly updates on:</div> | ||
|
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. In my opinion you have to many divs. in here the "sub-title" div supposed to be in a h1 label it will make your code easier to read |
||
| <div class="line-1"> | ||
| <img src=assets\images\icon-list.svg> | ||
|
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. Missing an alt artibute |
||
| <div class="text-1"> | ||
| Product discovery and building what matters | ||
| </div> | ||
| </div> | ||
| <div class="line-1"> | ||
| <img src=assets\images\icon-list.svg> | ||
| <div class="text-1"> | ||
| Measuring to ensure updates are a success | ||
| </div> | ||
| </div> | ||
| <div class="line-1"> | ||
| <img src=assets\images\icon-list.svg> | ||
| <div class="text-1"> | ||
| And much more! | ||
| </div> | ||
| </div> | ||
| <div class="email-title"> | ||
| Email address | ||
| </div> | ||
| <div class=field> | ||
|
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. In here you have to classes named "field" consider it is not good practice try to be more creative next time LOL : ) |
||
| <input type="text" placeholder="email@company.com" class="field"> | ||
| </div> | ||
| <button class="btn" type="button">Subscribe to monthly newsletter</button> | ||
| </div> | ||
| <div class="photo"> | ||
| <img class="photo-item" src=assets\images\illustration-sign-up-desktop.svg> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
| <!-- <div class="attribution"> | ||
| Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>. | ||
| Coded by <a href="#">Your Name Here</a>. | ||
| </div> | ||
| </div> --> | ||
| </body> | ||
|
|
||
| </html> | ||
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.
For next time, we usually writing our design in a separate file called style.css