-
Notifications
You must be signed in to change notification settings - Fork 0
Html css/week2/berhane #1
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
df597a6
c52aa70
b5ffa1c
520b8bd
1ca5fbf
c6e37ca
8dabe81
3514b7e
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,9 +1,247 @@ | ||||||
|
|
||||||
| /* We are using the 'Roboto' font from Google. This has already been added to your HTML header */ | ||||||
|
|
||||||
| html{ | ||||||
| height: 100%; | ||||||
| width: 100%; | ||||||
| } | ||||||
| body { | ||||||
| width: 100%; | ||||||
| font-family: 'Roboto', sans-serif; | ||||||
| -webkit-font-smoothing: antialiased; | ||||||
| margin: 0; | ||||||
| padding: 0; | ||||||
|
|
||||||
| } | ||||||
| /* flexbox*/ | ||||||
| .parent { | ||||||
| background-color: #ffffff; | ||||||
| margin: 0; | ||||||
| padding: 30px; | ||||||
| height:100%; | ||||||
|
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 don't think this |
||||||
| width: 100%; | ||||||
| display: flex; | ||||||
| flex-direction: column; | ||||||
| align-items: center; | ||||||
| justify-content:center; | ||||||
|
|
||||||
| } | ||||||
| .header { | ||||||
|
|
||||||
| width: 100%; | ||||||
| display: flex; | ||||||
| flex-direction: row; | ||||||
| align-items: center; | ||||||
| justify-content:center; | ||||||
| border-bottom: 1px solid #DDD; | ||||||
|
|
||||||
| } | ||||||
| .header .logo{ | ||||||
| margin-right: 150px; | ||||||
| width: 40px; | ||||||
| height: 40px; | ||||||
|
|
||||||
| } | ||||||
| .nav .nav-menu { | ||||||
| list-style: none; | ||||||
| display: flex; | ||||||
| flex-direction: row; | ||||||
| align-items: center; | ||||||
| justify-content:center; | ||||||
| text-decoration: none; | ||||||
| color: #838994 | ||||||
|
|
||||||
| } | ||||||
| .nav-menu li.active { | ||||||
| color: #2c2e31; | ||||||
| font-weight: 500; | ||||||
| } | ||||||
|
|
||||||
| .top_content { | ||||||
| /* background-color: #f800db;*/ | ||||||
| background-image: url(../img/first-background.jpg); | ||||||
| background-position: center bottom; | ||||||
| background-repeat: no-repeat; | ||||||
| background-size: cover; | ||||||
| height: 500px; | ||||||
| width: 100%; | ||||||
| margin: inherit; | ||||||
| padding: inherit; | ||||||
| display: flex; | ||||||
| justify-content: center; | ||||||
|
|
||||||
| } | ||||||
| .top_content_container{ | ||||||
| display: flex; | ||||||
| justify-content: center; | ||||||
| flex-direction: column; | ||||||
| align-items: center; | ||||||
|
|
||||||
| } | ||||||
| .top_content h1{ | ||||||
|
|
||||||
| color: white; | ||||||
| text-align: center; | ||||||
| font-family: inherit; | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
| } | ||||||
| .top_content h3{ | ||||||
| /*padding-left: 12.5rem;*/ | ||||||
|
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. It's good practice to remove any commented / unnecessary code before submitting a PR. |
||||||
| color: white; | ||||||
| text-align: center; | ||||||
| font-weight: 300; | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
| } | ||||||
| .top_content .btn{ | ||||||
| /*padding-left: 12.5rem;*/ | ||||||
| color: white; | ||||||
| text-align: center; | ||||||
| margin-top: 1.563rem; | ||||||
| } | ||||||
| button{ | ||||||
|
|
||||||
| width: 9.688rem; | ||||||
| background-color: #f15a29; | ||||||
| border-color: #f15a29; | ||||||
| text-shadow: none; | ||||||
| border-style: none; | ||||||
| border-radius: 4px; | ||||||
| padding: 1rem 1.5rem; | ||||||
| color: white; | ||||||
| font-size: 1.125rem; | ||||||
|
|
||||||
| } | ||||||
| .bottom_content{ | ||||||
| display: flex; | ||||||
| flex-direction: column; | ||||||
| align-items: center; | ||||||
| justify-content:center; | ||||||
| width: 100%; | ||||||
|
|
||||||
|
|
||||||
| } | ||||||
| .bottom_content h2{ | ||||||
| font-size: 2.75rem; | ||||||
| margin: 1.625rem 0 3.125rem; | ||||||
| font-weight: 100; | ||||||
|
|
||||||
| } | ||||||
| .case{ | ||||||
| display: flex; | ||||||
| flex-direction: row; | ||||||
| align-items: center; | ||||||
| justify-content:center; | ||||||
| width: 100%; | ||||||
| list-style: none; | ||||||
| } | ||||||
| .case_list{ | ||||||
| padding: 40px; | ||||||
| margin: 40px; | ||||||
|
|
||||||
| } | ||||||
| .caption{ | ||||||
|
|
||||||
| text-align: center; | ||||||
| font-size: 1.563rem; | ||||||
| } | ||||||
| .caption h5{ | ||||||
| text-align: center; | ||||||
| padding: 10px; | ||||||
| } | ||||||
| ul .case_list .caption { | ||||||
| /*background-color: lightcoral;*/ | ||||||
| display: block; | ||||||
|
|
||||||
| width: 100%; | ||||||
|
|
||||||
|
|
||||||
| } | ||||||
| hr{ | ||||||
| width: 100%; | ||||||
| } | ||||||
| .footer { | ||||||
| display: flex; | ||||||
| flex-direction: column; | ||||||
| width: 100%; | ||||||
| align-items: center; | ||||||
| justify-content: center; | ||||||
|
|
||||||
| } | ||||||
| .footer h5{ | ||||||
| text-align: center; | ||||||
| margin-block-start: 1.67em; | ||||||
| margin-block-end: 1.67em; | ||||||
| margin-inline-start: 0px; | ||||||
| margin-inline-end: 0px; | ||||||
| } | ||||||
| .icons { | ||||||
| display: flex; | ||||||
| flex-direction: row; | ||||||
| align-items: center; | ||||||
| justify-content: center; | ||||||
| padding: 20px; | ||||||
| margin: 20px; | ||||||
| border: 0; | ||||||
|
|
||||||
| } | ||||||
| ul{ | ||||||
| margin-block-start: 1em; | ||||||
| margin-block-end: 1em; | ||||||
| margin-inline-start: 0px; | ||||||
| margin-inline-end: 0px; | ||||||
|
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 general - if the value is
Suggested change
|
||||||
| padding-inline-start: 40px; | ||||||
|
|
||||||
| } | ||||||
| li{ | ||||||
| list-style: none; | ||||||
| padding: 10px; | ||||||
|
|
||||||
|
|
||||||
| } | ||||||
| .footer .icons > li { | ||||||
| border-radius: 1.25rem; | ||||||
| width: 2.5rem; | ||||||
| height: 2.5rem; | ||||||
| display: inline-block; | ||||||
| margin: 1.25rem 5px; | ||||||
| border: 1px solid #eaebec; | ||||||
| padding: 0.625rem 0; | ||||||
|
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. Some problems with the shape of these icons. |
||||||
| text-align: center; | ||||||
| } | ||||||
| .footer .twitter { | ||||||
| color: #55acee; | ||||||
| } | ||||||
| .footer .facebook { | ||||||
| color: #4c66a4; | ||||||
| } | ||||||
| .footer .instagram{ | ||||||
| color: #3f729b; | ||||||
| } | ||||||
| .fa { | ||||||
|
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 general I would be trying to stay away from editing 3rd party classes... |
||||||
| display: inline-block; | ||||||
| font: normal normal normal 14px/1 FontAwesome; | ||||||
| font-size: inherit; | ||||||
| text-rendering: auto; | ||||||
| -webkit-font-smoothing: antialiased; | ||||||
| -moz-osx-font-smoothing: grayscale; | ||||||
| } | ||||||
| /****Media Queries****/ | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| @media only screen and (min-width:400){ | ||||||
| .nav .nav-menu { | ||||||
| height: 200px; | ||||||
| flex-direction: column; | ||||||
| } | ||||||
| .header .logo{ | ||||||
| margin: 0; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,122 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <!------Head and Title--> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
| <title>Karma</title> | ||
| <link href='//fonts.googleapis.com/css?family=Roboto:400,500,300' rel='stylesheet' type='text/css'> | ||
| <link href='//fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'> | ||
| <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | ||
| <link rel="stylesheet" href="css/normalize.css"> | ||
| <!-- Add a link to your CSS file here (use the line above to guide you) --> | ||
| <link rel="stylesheet" href="css/style.css"> | ||
| <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> | ||
| <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> | ||
| </head> | ||
|
|
||
| <body> | ||
| <!-- Navigation content --> | ||
| <div class="parent"> | ||
|
|
||
| <header class="header"> | ||
|
|
||
| <img class="logo" src="img/karma-logo.svg" alt="karma-logo"> | ||
|
|
||
|
|
||
| <div class="nav"> | ||
| <ul class="nav-menu"> | ||
|
|
||
| <li class="active">Meet Karma</li> | ||
| <li class="item">How it Works</li> | ||
| <li class="item">Store</li> | ||
| <li class="item">Blog</li> | ||
| <li class="item">Help</li> | ||
| <li class="item">Login</li> | ||
| </ul> | ||
| </div> | ||
|
|
||
| </header> | ||
|
|
||
|
|
||
|
|
||
| <!-- Main body content --> | ||
| <div class="top_content"> | ||
| <div class="top_content_container"> | ||
| <h1>Introducing Karma</h1> | ||
| <h3>Bring Wifi with you, everywhere you go.</h3> | ||
| <div class="btn"><button>Learn More</button></div> | ||
| </div> | ||
|
|
||
| </div> | ||
| <div class="bottom_content"> | ||
|
|
||
| <h2>Everyone needs a little karma.</h2> | ||
| <ul class="case"> | ||
|
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 actually think it may be this that is causing the whitespace on the right of the webpage |
||
| <div> | ||
| <li class="case_list"><img width="127" height="127" src="img/icon-devices.svg" | ||
| alt="Internet for all devices image"></li> | ||
| <div class="caption"> | ||
| <h5>Internet for all devices</h5> | ||
| </div> | ||
| </div> | ||
| <div> | ||
| <li class="case_list"><img width="127" height="127" src="img/icon-coffee.svg" | ||
| alt="Boost your productivity image"></li> | ||
| <div class="caption"> | ||
| <h5>Boost your productivity</h5> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div> | ||
| <li class="case_list"><img width="127" height="127" src="img/icon-refill.svg" | ||
| alt="Pay as You Go image"> | ||
| </li> | ||
| <div class="caption"> | ||
| <h5>Pay as you go</h5> | ||
| </div> | ||
| </div> | ||
|
|
||
| </ul> | ||
|
|
||
|
|
||
| <!-- Add your HTML markup here --> | ||
| <!-- Remember: Use semantic HTML tags like <header>, <main>, <nav>, <footer>, <section> etc --> | ||
| <!-- All the images you need are in the 'img' folder --> | ||
|
|
||
| </div> | ||
|
|
||
| <!-- Footer content --> | ||
| <hr> | ||
|
|
||
| <div class="footer"> | ||
|
|
||
|
|
||
| <div> | ||
| <h5>Join us on</h5> | ||
| </div> | ||
|
|
||
|
|
||
|
|
||
| <ul class="icons"> | ||
| <li class="twitter"> | ||
| <i class="fa fa-twitter"></i> | ||
| </li> | ||
| <li class="facebook"> | ||
| <i class="fa fa-facebook"></i> | ||
| </li> | ||
| <li class="instagram"> | ||
| <i class="fa fa-instagram"></i> | ||
| </li> | ||
| </ul> | ||
|
|
||
|
|
||
|
|
||
|
|
||
| <!--div><ul class="icons"> | ||
|
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. remove commented code :) |
||
| <li class="twitter"></li><i class="fa fa-twitter"></i> | ||
| <li class="facebook"></li><i class="fa fa-facebook"></i> | ||
| <li class="instagram"></li><i class="fa fa-instagram"></i> | ||
| </ul></div--> | ||
|
|
||
| <div> © Karma Mobility, Inc.</div> | ||
|
|
||
| </div> | ||
| </div> | ||
| </body> | ||
| </html> | ||
|
|
||
| </html> | ||
|
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. FYI |
||
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.
padding here is causing a weird offset.
Although I see that it seems to fix something else - maybe we'll take a look at debugging this in the session later as these things can be frustrating to find the root cause