Tribute Page - Build a Tribute Page

Tell us what’s happening:

my code wont work, it says I need to do steps like:
add max-width too 100%
make height auto
display block
and center

when I already done those things

Your code so far

<!-- file: index.html -->
<html lang="en">
  <head>
    <link rel="stylesheet" href="styles.css">
    <title id="title">Dr Norman Borlaug tribute</title>
  </head>




<body>
<main id="main">
 <h1 id="title">Dr Norman Borlaug tribute</h1>
 <figure id="img-div">
   <img id="image" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQAsPweoR8f_Axl0Ae5spM0K_YvdE6mxXgbZ4NraXowjxdWpRxhRqDKzASL64IotjXJOUqYKRYrLugvJaO_aeviVA">



 <figcaption id="img-caption">an American agronomist who led initiatives worldwide that contributed to the extensive increases in agricultural production termed the <a id="tribute-link" target="_blank" href="https://en.wikipedia.org/wiki/Norman_Borlaug">Green Revolution.</a></figcaption>
 <p id="tribute-info">Borlaug is often called "the father of the Green Revolution",[6][7] and is credited with saving over a billion people worldwide from starvation.[8][3][9][10][11][12] According to Jan Douglas, executive assistant to the president of the World Food Prize Foundation, the source of this number is Gregg Easterbrook's 1997 article "Forgotten Benefactor of Humanity." The article states that the "form of agriculture that Borlaug preaches may have prevented a billion deaths."[13] Dennis T. Avery also estimated that the number of lives saved by Borlaug's efforts to be one billion.[12] In 2009, Josette Sheeran, then the Executive Director of the World Food Programme, stated that Borlaug "saved more lives than any man in human history".[14] He was awarded the 1970 Nobel Peace Prize in recognition of his contributions to world peace through increasing food supply.</p>
 </figure>
 </main>
</body>
 

/* file: styles.css */

image{display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-left: auto;}



Your browser information:

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

Challenge Information:

Tribute Page - Build a Tribute Page

Hi,
when you’re styling an element with their id selector, you always add # before the id in your CSS file for the selector. # for ids and . for classnames.
Good luck!

:slight_smile: quote=“VinceChristoper, post:1, topic:739326”]

  max-width: 100%;
  height: auto;

[/quote]

Hi there!:slight_smile:

When you add CSS rules, make sure to double check the namings. For example, if you want to change a tag, than add its name — img, p, h1, etc. Classes should be written with a dot in the beginning — .image, .redtext, etc. IDs should have a “#” instead of a dot — #image, #redtext, etc.

there isn’t a css element called image. You will meed to use a different selector