Tribute Page - Build a Tribute Page

Hi free code camp family. Pliz help, im stuck. It’s saying the img should be centered within its parent element. I did the following on the div parent element but its not working:

   **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
   <meta name="viewport" content="width-device-width, intial-scale=1"/>
   <meta charset="utf-8"/>
   <link rel="stylesheet" href="styles.css">
     <main id="main">
       <h1 id="title">Dr. Marvis Tsvangirai</h1>
       <div id="img-div"> 
         <img src="" id="image">     
     <p id="img-caption">Doctorate of Business Management & Entrepreneurship</p> </div>   
       <h2 id="tribute-info">Academic Qualifications</h2>
       <p><strong>2006: </strong>Completed grade 7 @Masemo Primary school</p>
       <p><strong>2010: </strong>Passed 8 'O'Level subjects @Gumunyu High School</p>
       <p><strong> 2012:</strong> Passed 'A'Level subjects @Gumunyu High School</p>
       <p><strong>2017:</strong>Graduated with Business Management & Entrepreneurship @Chinhoyi University of Technology</p>
       <p><i>Marvis has always been passionate about education. She is currently studying a Masters degree in Digital Marketing @CPUT. She is working as a Digital Marketer for a logistics company in Cape Town.</i></p>
<p>Visit her <a id="tribute-link" href="" target="_blank">Linkedin profile</a></p>       
/* 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:

Try to give margin left and right value: auto.

I have solved it. thanks a lot.

1 Like

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