Trouble with the tests on Tribute Page

Tell us what’s happening:

Hey, well I have trouble with the tribute page. It asks a max width of 100% and auto height. I don’t find my error, ayone could help me please ? I can’t pass the 10 tests ;(

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36.

Challenge: Build a Tribute Page

Link to the challenge:

1 Like

Try making the element with id=“img-div” a

rather than a element. That might be the issue, per user story #3.
1 Like

Hey, my issue is with the “layout one” the thing about max-width :thinking:

1 Like

Yes. It looks like that should be max-width: 100%; but should be inside a div, I think (according to user story #3 and #4)? So maybe the test is measuring according to that.

I just tried to replace figure by a div it didn’t work :frowning:

Hmmm, can’t find the reason either.

1 Like

This will work. You add a max-width but then it throws errors for display:block and margin:auto. It seems pretty ticky tack to me and honestly your site looks amazing so I don’t think it would be useful to just give you a hint. :slight_smile:

header #img-div img {
max-width: 80%;
margin: auto;
display:block;
border-radius: 50%;
box-shadow: 0 0 2rem rgba(255, 255, 255, 0.7);
transition: transform 0.7s;
}

1 Like

Heyyy, thanks for the feedback :smiling_face_with_three_hearts:

I tried what you tell but it didn’t solve the issue :frowning:

Needs to be max-width not width

2 Likes

Thanks, sorry ahah. It worked, you saved my day :slight_smile: