Tribute Page - Can´t understand id error

Hi there! This is my first ever forum post so please bare with me! :slight_smile: I’m trying to figure out what my mistakes are since i cant pass 4/10 tests. Here’s the link to my codepen code! https://codepen.io/trinipose/pen/KKMgQjw?editors=1100
Someone please help!!!

when it says expected null to not equal null it is because it doesn’t find the required id

are you sure you have used it?

I think i did, but i’m extremely new to this!
Thank you for your reply and help so far!

Here´s my code:
HTML

CSS

#tribute-info {font-family: Playfair Display;
font-size: 16.5px;
text-align: center;
width: 700px;
margin: auto;
margin-top: 15px;
color: #1b3633;}

#div-img {}

#image {width: 700px;
display: block;
margin: auto;
border-color: white;
border-width: 25px;
border-style: solid;}
img {
max-width: 700px;
display: block;
margin: auto;
border-color: white;
border-width: 25px;
border-style: solid;}

#img-caption {font-family: Playfair Display;
font-size: 13px;
text-align: center;
color: #1b3633;}

Test 3 is:

3. I should see either a <figure> or <div> element with corresponding id="img-div".

In your HTML you have this:

<div id="div-img">

Can you spot the difference? :slight_smile:

1 Like

omg I’m so embarrassed! Thank you Gordon! I’m so sorry for asking such a silly question! Fixed it! Thank you again and have a good afternoon/night/morning!

Don’t be embarrassed, this is what learning looks like I think :slight_smile:

1 Like

I may be abusing your generosity, but after changing that a new error appeared! It says that my image has to be centered to the parent element, isn’t just setting the “margin: auto” enough?

When I click through to your codepen, if I change “div-img” to “img-div”, it passes all the tests apart from the 7th one (which is due to your <a> being a little wonky). I don’t see an error about the image not being centered.

exactly! It’s the last challenge of all (the second one from the layout section!)