Tribute Page - Build a Tribute Page

I’ve been trying to make my #image tag centered in its parent and I don’t know how to do it

Your code so far

<!-- file: index.html -->
<html lang="en">
<link rel="stylesheet" href="styles.css">
  <main id="main">
    <h1 id="title">DR. NORMAN BORLAUG</h1>
    <div id="img-div">
      <img id="image"> 
      <figcaption id="img-caption">BAD GUY</figcaption> 
      <h2 id="tribute-info">The life of a great man</h2>
      <a href="" target="_blank" id="tribute-link">Click here for more on our client</a>


/* file: styles.css */



Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

I copied your code into the challenge and didn’t have any issue submitting it…
But also I didn’t see any images?

But in general you can try to set the margin-left and margin-right to auto on the image and its display to block, and also text-align: center and these properties work for centering together.

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