3e3f72ea10
Rather than tailoring contribution guides to the repo they reside in, I decided to make one that was more general and could be simply copy+pasted into each repo where necessary. This can require less upkeep when changes are made (simply copy+paste across all repos rather than needing to comb through and copy+paste only specific sections that were updated). Tailored instructions will be added later, such as instructions for running TOP locally, lesson writing guide (TBA), etc. |
||
---|---|---|
.github | ||
animation | ||
flex | ||
foundations | ||
grid | ||
margin-and-padding | ||
CONTRIBUTING.md | ||
README.md |
README.md
CSS Exercises
These exercises are a series of CSS related tasks intended to complement the HTML and CSS content on The Odin Project.
These exercises should be done when instructed during the course of the curriculum.
When doing the following exercises, please use all the documentation and resources you need to accomplish them. You are not intended to have any of this stuff memorized at this point. Check the docs, use Google, do what you need to do (besides checking the solutions) to get them done.
How to use these exercises
- Fork and copy this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo. Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.
- Go to an exercise directory and open the HTML file in your browser. You can either open the file directly, or use something like VSCode's Live Server.
- For each exercise, view the README, and edit the CSS file to make the output in your browser look like the images provided.
- Each README has a "Self Check" list. Use this to make sure you haven't missed any important details in your implementation.
- Don't check the solutions until you're done!
Some hints
- The official solutions put all changes at the end of the CSS file, which may duplicate some selectors (e.g. there might be a
body {}
in the given CSS, and anotherbody {}
in the solution). When you are working on an exercise, it is best practice to add your CSS to existing selectors instead of duplicating them at the end of the file. We're sacrificing this best practice in our official solutions to make it extra clear to you what things we changed to solve the exercise. - Unless listed in the self-check section, do not worry about getting the exact pixel value for things like margin, padding and font-size. These exercises are intended to test your knowledge of CSS, not your ability to guess that a screenshot is using
font: sans-serif bold 16px
, or that the margin is exactly42px
. - You may need to add some elements to your HTML to get things into the right spot. (For the first few exercises we make it explicit when this needs to happen.)
- You may need to add more selectors to your CSS file. The first few exercises have almost everything already done for you, but as you progress you'll find that you need to add more and more to get the correct result.
- In many cases, there will be multiple correct ways to solve these problems. The official solution isn't necessarily the only right way, but it is possible to do things in ways that are overall unhelpful. If your solution differs wildly from the official solution (and still passes the self-check criteria), feel free to ask about it in the chatroom.