-
-
Notifications
You must be signed in to change notification settings - Fork 620
NW Class 5 - Khesiwe Dube- HTML/CSS - Week 1 Karma project #468
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: master
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,3 @@ | ||
| { | ||
| "liveServer.settings.port": 5501 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,29 @@ | ||
|
|
||
| /* We are using the 'Roboto' font from Google. This has already been added to your HTML header */ | ||
|
|
||
| *{ | ||
| box-sizing: border-box; | ||
|
|
||
| } | ||
| body { | ||
| font-family: 'Roboto', sans-serif; | ||
| -webkit-font-smoothing: antialiased; | ||
| text-align: center; | ||
| color: black; | ||
| } | ||
| header { | ||
| display: flex; | ||
| justify-content: space-evenly; | ||
| } | ||
| .join { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| gap: 15px; | ||
|
|
||
| } | ||
| .join img{ | ||
| width: 20px; | ||
| height: 20px; | ||
| } | ||
|
|
||
| /** | ||
| * Add your custom styles below | ||
| * | ||
|
|
@@ -16,4 +34,159 @@ body { | |
| * - When using Flexbox, remember the items you want to move around need to be inside a parent container set to 'display: flex' | ||
| */ | ||
|
|
||
|
|
||
|
|
||
| nav { | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| ul li { | ||
| list-style: none; | ||
| display: inline-block; | ||
| } | ||
|
|
||
| ul li a { | ||
| color: grey; | ||
| text-decoration: none; | ||
| margin: 0px 20px; | ||
| } | ||
|
|
||
|
|
||
| ul li a:hover{ | ||
| color: orangered; | ||
| } | ||
|
|
||
| .high { | ||
| display: grid; | ||
| grid-template-columns: 50% 50%; | ||
| max-width: 1200px; | ||
| margin: 50px auto; | ||
| } | ||
|
|
||
| .low { | ||
| background-color: rgb(245, 190, 184); display: flex; align-items: center; justify-content: center; text-align: center; | ||
| } | ||
| .low p{ | ||
| font-size: 21px; | ||
| font-style: italic; | ||
|
|
||
| } | ||
| .main { | ||
| text-align: center; | ||
| background-image: url('./../img/first-background.jpg'); | ||
| background-size: cover; | ||
| padding: 150px 0; | ||
| color: white; | ||
| } | ||
| .store-main { | ||
| display: grid; | ||
| grid-template-columns: 50% 50%; | ||
|
|
||
| } | ||
| .store-main img{ | ||
| width: 100%; | ||
| height: 100%; | ||
| object-fit: cover; | ||
| display: block; | ||
| } | ||
| .icons { | ||
| display: flex; | ||
| justify-content: center | ||
| } | ||
| .images { | ||
| padding-top: 50px; | ||
| padding-bottom: 50px; | ||
| } | ||
| .image-icon { | ||
| display: flex; | ||
| justify-content: center; | ||
| gap: 20px; | ||
|
|
||
| } | ||
| .image-icon img{ | ||
| height: 170px; | ||
|
|
||
|
|
||
| } | ||
| h1 { | ||
| margin-top: 50px; | ||
| font-family: Roboto; | ||
| color: | ||
| #DE6E49; | ||
| } | ||
| .grid-2 { | ||
| display: grid; | ||
| grid-template-columns: 48% 48%; | ||
| justify-content: space-between; | ||
| } | ||
| .store { | ||
| color: #DE6E49; | ||
| } | ||
| input[type="text"], input[type="number"], select { display: block; padding: 7px; border: 2px solid #efefef; | ||
|
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. This is a clever CSS selector! Good work |
||
| width: 100%; | ||
| margin-bottom: 15px; | ||
| margin-top: 5px; | ||
| box-sizing: border-box; | ||
| border-color: | ||
| #666666 | ||
| } | ||
| form { | ||
| text-align: left; | ||
| padding: 50px 80px; | ||
| border: none; | ||
| } | ||
|
|
||
| .term { | ||
| font-family: 'Roboto'; | ||
| font-style: normal; | ||
| font-weight: 400; | ||
| font-size: 18px; | ||
| line-height: 140%; | ||
| } | ||
| .terms { | ||
| font-family: 'Roboto'; | ||
| color: | ||
| #DE6E49; | ||
| } | ||
| button { | ||
| background-color: tomato; | ||
| padding: 12px 25px; | ||
| border-radius: 5px; | ||
| border: none; | ||
| color: white; | ||
| margin-top: 10px; | ||
| } | ||
|
|
||
| .radio { | ||
| margin: 15px 0; | ||
| } | ||
| .checkbox { | ||
| margin-bottom: 15px; | ||
| } | ||
| .check { | ||
| color: | ||
| #DE6E49; | ||
| } | ||
| h2 { | ||
| margin-bottom: 30px; | ||
| font-size: 25px; | ||
| font-weight: 400; | ||
| } | ||
|
|
||
| .icons img{ | ||
| width: 20px; | ||
| height: 20px; | ||
| border-radius: 50%; | ||
|
|
||
|
|
||
| } | ||
| .icons { | ||
| border-radius: 50%; | ||
| padding: 20px; | ||
| } | ||
| .cons { | ||
| display: flex; | ||
| justify-content: center; | ||
|
|
||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Store- Karma</title> | ||
| <link rel="stylesheet" href="./css/style.css"> | ||
| </head> | ||
| <body> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <img src="./img/karma-logo.svg" width="30px" alt=""> | ||
| <Ul> | ||
| <li><a href="#">Meet Karma</a></li> | ||
| <li><a href="#">How it works</a></li> | ||
| <li><a class="store" href="#">Store</a></li> | ||
| <li><a href="#">Blog</a></li> | ||
| <li><a href="#">Help</a></li> | ||
| <li><a href="#">Login</a></li> | ||
| </ul> | ||
| </header> | ||
| <main class="store-main"> | ||
| <fieldset> | ||
|
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. fieldset is normally used for grouping radio buttons to make clear they are related for accessability, rather than for the full form See https://syllabus.codeyourfuture.io/html-css/week-2/lesson#radio-input-fields https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset |
||
| <form> | ||
| <h1>Add Your Karma Wifi Today!</h1> | ||
| <div class="grid-2"> | ||
| <div> | ||
| <label for="name">Name*</label> | ||
| <input type="text" name="name" id="name"> | ||
| </div> | ||
| <div> | ||
| <label for="surname">Surname*</label> | ||
| <input type="text" name="surname" id="surname" value="surname"> | ||
| </div> | ||
| </div> | ||
| <div> | ||
| <label for="address">Address*</label> | ||
| <input type="text" name="address" id="adress"> | ||
| </div> | ||
| <div> | ||
| <label for="adress">Address 2</label> | ||
| <input type="text" name="address"> | ||
| </div> | ||
| <div class="grid-2"> | ||
| <div> | ||
|
|
||
| <label for="city">City</label> | ||
| <select name="city" id="city" name="city" required> | ||
| <option value="Manchester">Manchester</option> | ||
| <option value="Liverpool">Liverpool</option> | ||
| <option value="London">London</option> | ||
| <option value="Birmingham">Birmingham</option> | ||
| </select> | ||
| </div> | ||
| <div> | ||
| <label for="postcode">Postcode</label> | ||
| <input type="text" name="postcode" id="postcode"> | ||
| </div> | ||
| </div> | ||
| <div class="radio"> | ||
| Select a Color | ||
| </div> | ||
| <label for="Karma Orange">Karma Orange</label> | ||
| <input type="radio" name="color" id="karma orange" value="karma orange"> | ||
| <div class="checkbox"> | ||
|
|
||
| <label for="Space Grey">Space grey</label> | ||
| <input type="radio" name="color" id="space grey" value="space grey"> | ||
| </div> | ||
| </div> | ||
| <div class="term"> | ||
| By placing an order you agree to Karma's <a class="terms" href="https://example.com">Terms and Conditions</a> | ||
| <label for=""></label> | ||
|
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. You've used labels throughout which is brillant but the spec on the assignment does ask for validation on the form fields as well see https://syllabus.codeyourfuture.io/html-css/week-2/lesson#form-validation |
||
| <input class="check" type="checkbox"> | ||
| </div> | ||
| <div> | ||
| <button>Place my order</button> | ||
| </div> | ||
| </form> | ||
|
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. Forgot to close the main tag :) |
||
| <footer> | ||
| <h6 >Join Us On</h6> | ||
| <div class="icons"> | ||
| <a class="icons" href="#"> | ||
| <img src="./img/twitter-icon.svg" alt="twitter"> | ||
| </a> | ||
| <a class="icons" href="#"> | ||
| <img src="./img/facebook-icon.svg" alt="facebook"> | ||
| </a> | ||
| <a class="icons" href="#"> | ||
| </a> | ||
| <img src="./img/instagram-icon.svg" alt="insta"> | ||
| </div> | ||
| <h5>Karma mobility Inc</h5> | ||
| </a> | ||
| </footer> | ||
| </fieldset> | ||
| <img class="lady" src="./level-2/store-image_by-andrew-neel-unsplash.jpg"> | ||
| </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.
It's best to use rem or em units when possible :)