Stuck on the last two parts of the tribute challenge

i am stuck on the last two parts of the tribute challenge

#img-div {
  display: block;
  position: absolute;
  justify-content: center;

img {
  max-width: 100%;
  height: auto;
  <body id="main">
    <h1 id="title">Mr David Elton</h1>
    <div id="img-div"><img id="image" src="#" alt="picture of Mr David Elton">
      <figcaption id="img-caption">Picture of Mr David Elton</figcaption>
    <p id="tribute-info">blah blah blah blah</p>
    <a id="tribute-link" href="#" target="_blank">click link for additional info</a>

if anyone can give me pointers on where i am going wrong it would be a great help

the two challenges are

User Story #8: The img element should responsively resize, relative to the width of its parent element, without exceeding its original size.

User Story #9: The img element should be centered within its parent element.


Hi @whitestar2010 !

Welcome to the forum!

When working on the projects, it is better to share a link to your codepen so people can see the issue better for themselves.

Also, for all of the projects, please keep the test suite.

<script src=""></script>

When I test your code in codepen, I am getting 9/10.

When a test is failing make sure to click on the red test button and read the full error message.
The error message tells you what is missing.
Use the “display” style property with a value of “block” for responsive images.: expected ‘inline’ to equal ‘block’

When I make that change then it passes for me.

Also, as a sidenote, you shouldn’t use style tags.
Now that you are building projects, you should get used to seperating your html and css.

I would suggest moving your css to the css section in codepen.

Hope that helps!

strange in my codepen I keep only getting 8/10?

how do you share a codepen link?

yay I have done it thank you for the help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.