Tell us what’s happening:
So after reading many similar questions about getting the image to display as per the requirements, and not getting any results. I added my code to codepen and noticed that the canvas there was responding. this is what I tried:
img {
max-width: 100%;
display: block;
height: auto;
margin: 0 auto;
}
I also tried many different ways to resolve the final project, no luck. why does it respond as it should in codepen and not in FCC?
Your code so far
<!-- file: index.html -->
<main id="main">
<h1 id="title">This is the title</h1>
<div id="img-div">
<figure>
<img id="image" src="https://images.unsplash.com/photo-1737464604499-ced062ab5958?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" >
<figcaption id="img-caption">this is some info</figcaption>
</figure>
<div id="tribute-info">
<p>this is some info</p>
<a href="https://www.wikihow.com/Connect-Wood-to-Concrete#:~:text=You%20can%20fasten%20wood%20to,fasten%20wood%20and%20concrete%20objects!" id="tribute-link" target="_blank"></a>
</div>
</div>
</main>
/* file: styles.css */
img {
max-width: 100%;
display: block;
height: auto;
margin: 0 auto;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Challenge Information:
Tribute Page - Build a Tribute Page