My tribute page - 9/10 can't figure out why!

Hey campers,

Just finished my tribute page, but i am still at 9/10 since apparently my image is not responsive.

I’ve triple checked everything, even checked other people’s efforts, but i can’t figure out where i am wrong.
Also, it suggests that i use “display: block;” but it just shifts my image to the left of the page.

Here is my code: https://codepen.io/ngerempakanis/pen/RwoyJxz

Thank you for your time.

ngerempakanis

Hi @ngerempakanis !

Welcome to the forum!

Img tags are inline elements.
In order to properly center an image you need to set it to block and then use the margin property to center it.

https://www.w3schools.com/howto/howto_css_image_center.asp

1 Like

Thank you very much!

1 Like

I ran the tests, it said 10/10

Good job passing the tests @ngerempakanis.

I noticed quite a few <br> elements in your code. Do not use the <br> element to force line breaks or spacing. That’s what CSS is for. If you want multiple paragraphs then use multiple paragraph elements.

Yes, i corrected it after the above advice, thanks!

Thank you for the feedback Roma,
I actually used them as i wanted some added space between the paragraphs, and not to actually separate the paragraphs. I couldn’t think of a way to do this any other way at the time.

I just reviewed my code, and apparently that’s exactly what i did.
Thanks for pointing it out.

You can use CSS to change the margin and padding between elements:

For example, if I wanted to make more space between three paragraphs, I can just add a CSS selector, that targets the paragraphs:

p {}

Next I just add a margin or padding code:

`p {
padding: 12px; }

This adds a margin all around the paragraph that makes there be more spacing, therefore no need for <br/> tags, woohoo~ :boom: