Tribute Page - Build a Tribute Page

Tell us what’s happening:
Describe your issue in detail here.

Your code so far
I think I followed the instruction right.
can you help me what is wrong with these?
These are the requirements that is not met:

  • Your img element should have a display of block.

  • Failed:Your #image should have a max-width of 100%.
    Your #image should be centered within its parent.

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <title id="title">Charmander</title>
  <main id="main">
    <div id="img-div">
    <img src="" alt="pokemon" id="image"/>
    <div id="img-caption">Charmander</div>
    <h1 id="tribute-info"><a href="" id="tribute-link" target="_blank">Info on Charmander</a></h1>

/* file: styles.css */
.image {
  display: block;
  height: auto;
  text-align: center;

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

that’s not how to center an image in css.

use margin or flexbox

Thanks, I solve the problem I did not link the css to my html hahaha

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