-
Notifications
You must be signed in to change notification settings - Fork 25
InClassProject_W2_2Truths_1Lie #10
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 |
|---|---|---|
|
|
@@ -11,14 +11,47 @@ | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;700&display=swap" rel="stylesheet"> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <h1>Two Truths, One Lie</h1> | ||
| </header> | ||
| <main> | ||
| <!-- how will you mark up your media objects --> | ||
| </main> | ||
| <footer> | ||
| <h3>By YOUR NAMES HERE</h3> | ||
| </footer> | ||
| <header> | ||
| <h1>Two Truths, One Lie</h1> | ||
| <p>Can you guess which statement is false?</p> | ||
| </header> | ||
| <main class="main"> | ||
| <!-- how will you mark up your media objects --> | ||
| <section class="azan"> | ||
| <div class="name"> | ||
| <img src="img/download (1).jpg" /> | ||
|
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. Your app is failing Accessibility in Lighthouse because you do not have alt attributes in your images. If you know the size of the source images you intend to use. You should set the image elements height and width to match. This way the browser creates the correct amount of space for the image while it waits for the image to load. This preserves the intended layout should the image src fail to load and also reduces "jank" which improves UX. |
||
| <h2>Azan</h2> | ||
| </div> | ||
|
|
||
| <div class="statements"> | ||
| <ul> | ||
| <li>I was born in Dubai.</li> | ||
| <li>My ancestors are originally from Turkey.</li> | ||
| <li> | ||
| I once went on a hiking trip to climb K-2 the second highest | ||
| mountain in the world. | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| </section> | ||
|
|
||
| <section class="abed"> | ||
| <div class="name"> | ||
| <img src="img/download.jpg" /> | ||
| <h2>Abed</h2> | ||
| </div> | ||
|
|
||
| <div class="statements"> | ||
| <ul> | ||
| <li>I am 39 years old.</li> | ||
| <li>I like swimming.</li> | ||
| <li>I am working as a junior web developer.</li> | ||
| </ul> | ||
| </div> | ||
| </section> | ||
| </main> | ||
| <footer> | ||
| <h3>By Azan and Abed</h3> | ||
| </footer> | ||
| </body> | ||
| </html> | ||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,4 +30,82 @@ | |
|
|
||
| body { | ||
| font: 100% "Poppins", sans-serif; | ||
| background-color: black; | ||
| color: yellow; | ||
| text-align: center; | ||
| } | ||
|
|
||
| main { | ||
| display: grid; | ||
| gap: 15px; | ||
| grid-template-areas: ". azan abed ."; | ||
| justify-items: stretch; | ||
| margin-top: 7%; | ||
| grid-template-columns: 0 2fr 2fr 0; | ||
| } | ||
|
|
||
| .name { | ||
| display: flex; | ||
| justify-content: space-around; | ||
| align-items: center; | ||
| color: gold; | ||
| font-weight: 700; | ||
| padding-top: 2%; | ||
| } | ||
|
|
||
| .name h2 { | ||
| margin-right: 30%; | ||
| } | ||
| .name img { | ||
| margin-left: 3%; | ||
| max-width: 250px; | ||
| max-height: 150px; | ||
| border: 3px solid goldenrod; | ||
| border-radius: 10px; | ||
| } | ||
|
|
||
| .azan { | ||
| grid-area: azan; | ||
| border-radius: 10px; | ||
| transition: 0.5s; | ||
| padding-top: 10px; | ||
| } | ||
| .azan:hover { | ||
|
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 style rule is the same as |
||
| box-shadow: 0px 0px 20px gold; | ||
| } | ||
|
|
||
| .abed { | ||
| border-radius: 10px; | ||
| transition: 0.5s; | ||
| padding-top: 10px; | ||
| grid-area: abed; | ||
| } | ||
|
|
||
| .abed:hover { | ||
| box-shadow: 0px 0px 20px gold; | ||
| } | ||
|
|
||
| .statements { | ||
| padding: 1rem; | ||
| text-align: left; | ||
| margin-left: 5%; | ||
| } | ||
|
|
||
| footer { | ||
| text-align: center; | ||
| margin-top: 5%; | ||
| margin-bottom: 5%; | ||
| } | ||
|
|
||
| @media screen and (max-width: 700px) { | ||
| main { | ||
|
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. |
||
| grid-template-areas: | ||
| ". azan azan ." | ||
| ". abed abed ."; | ||
|
|
||
| } | ||
| .name img { | ||
| max-width: 150px; | ||
| max-height: auto; | ||
| } | ||
| } | ||
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.
You could use a
<header>here instead of a<div>, the<header>tag is not just for the header of the page.