Tribute Page - Build a Tribute Page

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

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <link rel="stylesheet" href="styles.css">
  <head></head>
    <meta charset="UTF-8" />
    <main id="main">
      
      <title id="title">Dr. Norman Borlaug</title>
<div id="img-div">
  <img id="image" >

  <div id="img-caption">This is his photo</div>
  <div id="tribute-info">this page is about Dr. Harry Osborn</div>
  <a id="tribute-link" target="_blank" href="https://www.youtube.com/watch?v=iJVg9DyhG_o">
</div>
</main>
</html>
    
     
/* file: styles.css */

Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

Please 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!

  • Your img element should have a display of block.
  • Failed:Your #image should have a max-width of 100%.
    ** Failed:Your #image should be centered within its parent.
    i couldnt solve these three

how to make css file for my image element and how to attach to my code

the styles.css file tab is on the challenge website.
just click it to open the editor and put your css code there

i got it . just one problem. how to align the image to the centre

Usually we align things in the center by setting the left and right margin to auto and setting the align-text property to center.

i tried everything , i am stuck on just this thing

Okay pls share your css code so we can try it.

Btw the link and meta elements should be nested inside the head element

img {
max-width: 100%;
display: block;
height: auto;
marign-left: auto;
margin-right: auto;
justify-content: center;

done already but need help on align image

this is not an img tag
img tags needs src values

sorry im new to learning i added a tag

can you post your new code?

i got it . thanks for your help

1 Like

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