Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added img/download (1).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/download.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 43 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Copy link
Copy Markdown

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.

<img src="img/download (1).jpg" />
Copy link
Copy Markdown

@mike-shields-dev mike-shields-dev Aug 29, 2021

Choose a reason for hiding this comment

The 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>
78 changes: 78 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style rule is the same as .abed:hover you could have added a class to both elements in the DOM and used a single style rule.

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 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  main {
    grid-template-columns: 0 1fr 0;
    grid-template-areas: 
    ". azan ."
    ". abed .";
  }

grid-template-areas:
". azan azan ."
". abed abed .";

}
.name img {
max-width: 150px;
max-height: auto;
}
}