Tribute Page - Build a Tribute Page

Tell us what’s happening:
how do I center my img within its parent please?

Your code so far

<!-- file: index.html -->
<main id="main">
    <h1 id="title">Dr.Norman Borlaug</h1>
    <div id="img-div">
        <img id="image"></img>
        <div id="img-caption">Dr. Norman Borlaug</div>
    </div>
    <e id="tribute-info">Dr.Norman's tribute</e>
    <a id="tribute-link" href="https://tribute-page.freecodecamp.rocks" target="_blank">click here for more info<a/>

    <link rel="stylesheet" href="styles.css">

</main>

         













            

/* file: styles.css */
img{
    display: block;
    max-width: 100%;
    height: auto;
    justify-content: center;
    width: 175px;
    border-radius: 20%;
}

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

can you fix this line of code first?
img is self-closing and should contain a src attribute pointing to the location of the image

oh okay thanks, but is that the only problem i have?

Possibly not. But since your question is about images, the first thing I looked for is an image, and I couldn’t find one…

i have rectify that but its still not working

can you update the code above or post new code below?

please move this line of code also to the head element (which comes before the main element)

Another issue:
I am not familiar with an HTML <e> element.
Where did you hear about this one? (please post a link to the lesson or website you got this from or explain what an e element does please)

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