Skip to content

Instantly share code, notes, and snippets.

@mmcguff
Created June 20, 2019 11:56
Show Gist options
  • Save mmcguff/e4aafbaa8834324aa9eefe60085139ab to your computer and use it in GitHub Desktop.
Save mmcguff/e4aafbaa8834324aa9eefe60085139ab to your computer and use it in GitHub Desktop.
Free Code Camp | Tribute Page
<body>
<div id="main">
<div id="img-div">
<a href="https://www.walmart.com" target="_blank"><img style="max-width: 100%;" id="image" src="https://cdn.britannica.com/s:300x300/99/189499-004-F37D4D46.jpg" alt="Sam Walton">
</a>
<div id="img-caption">Sam Walton in his famous hat!</div>
</div>
<div id="tribute-info">
<p>Samuel Moore Walton was an American businessman and entrepreneur best known for founding the retailers Walmart and Sam's Club. Wal-Mart Stores Inc. grew to be the world's largest corporation by revenue as well as the biggest private employer in the world. At one point in his life, he was the richest man in America.</p>
</div>
<a id="tribute-link" href="https://www.walmart.com" target="_blank">Come visit Walmart.com</a>
<h1 id="title">Tribute to Sam Walton</h1>
</div>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
#main {
max-width: 300px;
margin: auto;
text-align: center;
opacity: .99;
}
img {
max-width: 100%;
height: auto;
display: block;
max-width: 300px;
text-align: center;
}
#tribute-info {
text-align: left;
}
body {
background-image: url("https://cdn.corporate.walmart.com/dims4/WMT/0d3c175/2147483647/resize/603x%3E/quality/90/?url=https%3A%2F%2Fcdn.corporate.walmart.com%2Fcb%2Fa9%2Feae1347840f3b2c561460fe58474%2F06-sparkonly-sparkpause-orig.gif");
height: 200px; /* You must set a specified height */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment