Skip to content

Commit

Permalink
Merge pull request TheOdinProject#367 from dev-ethanjohn/feature/read…
Browse files Browse the repository at this point in the history
…me-and-html-updates

Feature/readme and html updates
  • Loading branch information
codyloyd authored Aug 29, 2023
2 parents 9ab349e + 21e8746 commit a9f93b1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion foundations/04-chaining-selectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

Credits for the images in this exercise go to [Katho Mutodo](https://linktr.ee/photobykatho_) and [Andrea Piacquadio](https://www.pexels.com/@olly?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels).

With this exercise, we've provided you a completed HTML file, so you will only have to edit the CSS file. For this exercise, it's more important to understand how chaining different selectors works than how to actually add the attributes.

With this exercise, we've provided you with a partially completed HTML file which you'll configure. The purpose of this exercise is to focus on understanding how to chain different selectors, rather than solely adding attributes. Additionally, you'll have the chance to review your HTML images.

We have two images for you to style, each with two class names, where one of the class names is shared. The goal here is to chain the selectors for both elements, so that each have a unique style applied, despite using a shared class selector. For example, you want an element that has both X and Y to have one set of styles, while an element with X and Z has a completely different set of styles. We included the original images as well, so that you can see how the styles you will be adding look in comparison, so do not add any styles to them.

**Note:** Download and group the images in a separate "images" folder. Ensure correct image source paths in your HTML to avoid image loading issues. This is crucial for a cleaner project structure.

The properties you need to add to each element are:

* Make the element with both the `avatar` and `proportioned` classes 300 pixels wide, then give it a height so that it retains its original square proportions (don't hardcode in a pixel value for the height!).
Expand Down
9 changes: 5 additions & 4 deletions foundations/04-chaining-selectors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Check image source path. Review Foundations lesson - Links and Images -->
<!-- Use the classes BELOW this line -->
<div>
<img class="avatar proportioned" src="./pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="avatar distorted" src="./pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
<img class="avatar proportioned" src="" alt="Woman with glasses">
<img class="avatar distorted" src="" alt="Man with surprised expression">
</div>
<!-- Use the classes ABOVE this line -->
<div>
<img class="original proportioned" src="./pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="original distorted" src="./pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
<img class="original proportioned" src="" alt="Woman with glasses">
<img class="original distorted" src="" alt="Man with surprised expression">
</div>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions foundations/04-chaining-selectors/solution/solution.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
</head>
<body>
<div>
<img class="avatar proportioned" src="../pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="avatar distorted" src="../pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
<img class="avatar proportioned" src="./images/pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="avatar distorted" src="./images/pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
</div>
<div>
<img class="original proportioned" src="../pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="original distorted" src="../pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
<img class="original proportioned" src="./images/pexels-katho-mutodo-8434791.jpg" alt="Woman with glasses">
<img class="original distorted" src="./images/pexels-andrea-piacquadio-3777931.jpg" alt="Man with surprised expression">
</div>
</body>
</html>
1 change: 1 addition & 0 deletions foundations/04-chaining-selectors/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* Add CSS Styling */

0 comments on commit a9f93b1

Please sign in to comment.