Tribute Page - Build a Tribute Page

Tell us what’s happening:
What is wrong with my code?
Here is the test case status.

  • Failed:Your img element should have a display of block.

  • Failed:Your #image should have a max-width of 100%.

  • Passed:Your #image should have a height of auto.

  • Failed:Your #image should be centered within its parent.

    **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="description" content="Tribute Page project" />
  <title>Mahatma Gandhi</title>
  <link rel="stylesheet" href="stylesTribute.css" />
  <main id="main">
      <h1 id="title">Mahatma Gandhi</h1>
      <p>First they ignore you, then they laugh at you, then they fight you, then you win.</p>
    <div id="img-div">
        <img id="image" src=""" alt="Mohandas Karamchand Gandhi">
        <figcaption id="img-caption">Picture of Mohandas Karamchand Gandhi</figcaption>
        <p>Mohandas Karamchand Gandhi (2 October 1869-30 January 1948), commonly known as Bapu, was an Indian lawyer, anti-colonial nationalist and political ethicist who employed nonviolent resistance to lead the successful campaign for India's independence from British rule,and to later inspire movements for civil rights and freedom across the world. The honorific prefix Mahātmā (Sanskrit: "great-souled", "venerable"), first applied to him in 1914 in South Africa, is now used throughout the world.</p>
    <div id="tribute-info">
        <h3>Mohandas Karamchand Gandhi (2 October 1869 - 30 January 1948)</h3>
        <h4>Here's a timeline of this great soul</h4>
            <li><span>October 2, 1869:</span>Birth of Mohandas Karamchand Gandhi.</li>
            <li><span>September 4, 1888:</span>Gandhi leaves for England to study law.</li>
            <li><span>October 1899:</span>Outbreak of Boer War (1899-1901) in South Africa. Gandhi organizes an ambulance corps for the British.
            Gandhi returns to India to attend the Indian National Congress. G.K. Gokhale introduces him to nationalist leaders.</li>
            <li><span>July 31, 1907:</span>The Boer Republic Transvaal, now under the control of the British, attempts to register all Indians as members; Gandhi and others refuse to register. Their resistance efforts mark the first use of nonviolent non-cooperation by the Indian minority in South Africa, soon calledsatyagraha, or "soul-force."</li>
            <li><span>January 11, 1908:</span>Gandhi is arrested and sentenced to two months in prison.</li>
            <li><span>August 15, 1947:</span>Indian independence becomes official, as does the partition into two countries, India and Pakistan.</li>
            <li><span>August-December 1948:</span>India dissolves into chaos and killings, as Hindus and Muslims flee for the borders of India and Pakistan.</li>
            <li><span>January 30, 1948:</span>Gandhi is assassinated by Nathuram Vinayuk Godse, a Hindu nationalist.</li>

  <footer><p>Browse for more info on <a id="tribute-link"href="" target="_blank">Mahatma-Gandhi</a></p></footer>
/* file: styles.css */
  margin: 20px 20px;;
  color: #333;
  font-family: sans-serif,monospace;

  padding-top: 5px;
  padding-bottom: 5px;
header {
  width: 100%;
  display: inline-block;
  justify-content: center;
  align-items: center;
  margin: 10px;

  font-weight: 800;
  color: darkslategray;
  text-align: center;
header > p{
  text-align: center;
  max-width: 100%;
  height: auto;
  margin:0 auto;
#img-div {
  width: 70%;
  margin: auto;
  padding: 20px;
  background-color: white;
  font-family: monospace;


  font-size: 0.75rem;
  text-align: center;
@media (max-width:460px) {
      font-size: 0.5rem;
#img-div > p{
  max-width: 70%;
  margin: 0 auto 50px auto;
  text-align: left;
  font-size: 0.9rem;
  font-family: monospace;
  font-weight: 700;
  text-align: center;
  color: #414350;

  text-align: center;
  font-size: 12px;
  color: #477ca7;
  color: darkred;

  **Your browser information:**

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

HI @Shev95 !

At first glance I noticed this

the fcc editor is looking for a different file name.

The correct file name is styles.css

Note: Be sure to add <link rel="stylesheet" href="styles.css"> in your HTML to link your stylesheet and apply your CSS

Thank you. It works.

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