Tribute Page - Build a Tribute Page

What I’m stuck on at the moment is:
Your #image should be centered within its parent.
Your #image should have a max-width of 100% .
Your img element should have a display of block .

I have linked the correct file styles.css and I have all the info on the style sheet I have everything named correctly and no name multiples I don’t understand where I’m going wrong?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title id='title'>oogly boogly</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    
    <main id='main'>
      <figure id="figure"></figure>
      <figure id="img-div">
        <img id="image" src="https://www.google.co.uk/search?sca_esv=598104924&sxsrf=ACQVn08EMGbLxT0une9tKsPhUfISlX1Drw:1705140299948&q=oogly+boogly&tbm=isch&source=lnms&sa=X&ved=2ahUKEwiXlfvOjtqDAxXdWkEAHajoASoQ0pQJegQIDxAB&biw=1920&bih=953&dpr=1#imgrc=fJq7-9OAxLXRVM">
        </img>
      </figure>
      <div id="img-caption">
      <figure id='img-div'>
      <figure id="img-caption">
        <figcaption id="img-caption"></figcaption>
      </figure>
      <figure><p id="tribute-info">bad guy from nightmare before christmas</p>
      <p> <a id="tribute-link" href="" target="_blank"><a/> </p>
      </figure>
      </div>
    </main>
  </body>
</html>
/* file: styles.css */
image {
  display: block;
  height: auto;
  max-width: 100%;
  align-items: center;
}

Your browser information:

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

Challenge Information:

Tribute Page - Build a Tribute Page

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

Hello @DipSimp !

Suggestion:

Is the image, an element, or an id? Something is missing before it.

Please consider adding the img to the CSS file and providing it with

Your img element should have a display of block .

You may want to check if it needs any other styling to match the #image.

Centering the image to its parent can be done by using margins on both sides.

I cannot provide more detail because this is a certification project.

Wishing you good progress.

Thank you this was a great help once I realized where I was going wrong it was an easy fix

1 Like

You are very welcome @DipSimp !

Wishing you much more good progress!

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