Tribute Page - Build a Tribute Page

Tell us what’s happening:
Describe your issue in detail here.
how can I center my #img to it parent
Your code so far

<!-- file: index.html -->
<link rel="stylesheet" href="styles.css">
<main id="main"></main>
<h1 id="title">Learning coding is fun<h1>
  <div id="img-div" src="">
    <img id="image">
    <figcaption id="img-caption">Loading...</figcaption>
  <tribute id="tribute-info">i am a web developer.</tribute>
  <a id="tribute-link" href="#" target="_blank">i am a web developer.</a>
/* file: styles.css */
  display: block;
  max-width: 100%;

  display: flex;

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

You have a couple of issues

That div should not have a src attribute. Remember that src attributes should be for the img element.

You should use the actual image address here so it will display correctly

Use this

Tribute is not a valid HTML tag.
You will need to use another HTML element there instead.

I would suggest setting the direction of elements to column and that will help with your centering issue.

Hope that helps :+1:

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