Tribute Page - Build a Tribute Page

Tell us what’s happening:
so i keep failing these tests:-

Your img element should have a display of block.
Your #image should have a max-width of 100%.
Your #image should be centered within its parent
but i have actually implemented all of these correctly in my code and it should run but the the test engine keeps throwing fail
im posting my code below please check if there is something wrong
i will appreciate the help!
Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

//html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Dale Cooper</title>
    <link rel="stylesheet" href="c.css" />
  </head>
  <body>
    <main id="main">
      <h1 id="title">SPECIAL AGENT DALE COOPER</h1>
      <blockquote class="bc">
        "Every day, once a day, give yourself a present. Don’t plan it, don’t
        wait for it, just let it happen. It could be a new shirt at the men’s
        store, a catnap in your office chair or two cups of good hot black
        coffee."
      </blockquote>

      <figure id="img-div">
        <img
          src="https://industrialscripts.com/wp-content/uploads/2017/05/dale-cooper-1.jpg"
          alt="dalecooper"
          id="image"
        />
        <figcaption id="img-caption">
          Dale Bartholomew Cooper was a Special Agent of the Federal Bureau of
          Investigation who in 1989 was assigned to investigate the brutal
          murder of the popular high school student, Laura Palmer in the town of
          Twin Peaks, Washington.
        </figcaption>
      </figure>
      <h3>Here's a timeline for Dale Cooper:</h3>
      <div id="tribute-info">
        <ul>
          <li>
            <span class="years">1954</span>- Dale Bartholomew Cooper was born on
            April 19, 1954 to Mr. and Mrs. Cooper of Philadelphia, Pennsylvania.
            He had one older brother, Emmet.
          </li>
          <li>
            <span class="years">1967</span>- Dale was given a Norelco B2000 tape
            recorder by his parents, with which he began to create audio
            recordings detailing his life.The first adventure he had with his
            tape recorder was in early 1968 when he investigated the 24th Street
            gang, who had stolen a bike belonging to Dale's friend and
            next-door-neighbor, Bradley Schlurman.
          </li>
          <li>
            <span class="years">1968</span>- Dale's paternal grandmother was
            visiting and had a fatal stroke in the kitchen whilst making a pie.
            His mother had him place his hand on his grandmother's forehead to
            show him that death was not to be feared.
          </li>
          <li>
            <span class="years">1969</span>- Marie told Dale that she had found
            Jesus and wished to help him see the light. Dale noted that although
            he did not like everything about the "new" Marie, her legs were "the
            most beautiful things" he had ever seen in his life up to that
            point. On Valentine's Day, she sent him a card that contained a
            drawing of her holding a baby Jesus. Dale was not sure what to
            think..
          </li>
          <li>
            <span class="years">1970</span>- Dale met April again, as she was
            student teaching his English class. She had broken up with Star
            after a fight. April tried to teach Dale how to write poetry, but it
            was soon apparent that it was not his area of expertise.
          </li>
          <li>
            <span class="years">1973</span>- Dale got a job digging holes with a
            man named Jim, whose home burned up one night and his body was not
            found. However, Cooper saw the shadow of a man in a nearby alley,
            where laughter also occurred.
          </li>
          <li>
            <span class="years">1974</span>- Dale took an internship at the
            county hospital to study mental patients. During this time, he
            connected with a patient named Betty. However, just over a day
            later, she held a knife to an orderly's throat and was shot by
            police. When she was wheeled out, Cooper recalled her saying, "I'm
            free," and she later died from her wounds.
          </li>
        </ul>
        <blockquote class="end">
          “I have no idea where this will lead us, but I have a definite feeling
          it will be a place both wonderful and strange.”
          <span>--Dale Cooper</span>
        </blockquote>
      </div>
      <h2>
        If you have time, you should read more about this incredible human being
        on his
        <a
          href="https://twinpeaks.fandom.com/wiki/Dale_Cooper"
          id="tribute-link"
          target="_blank"
          >wikia</a
        >
      </h2>
    </main>
  </body>
</html>


//css
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #ffffff;
}

#title,
.bc {
  text-align: center;
  padding: 1rem;
}

#img-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#image {
  max-width:100%;
  height: auto;
  display: block;
  margin-bottom: 10px;

  margin:auto;
 
}


#img-caption {
  align-self: center;
  text-align: center;
  padding: 1rem;
  white-space: normal;
}

h3 {
  text-align: center;
  padding-bottom: 5px;
  margin-bottom: 25px;
}

ul {
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

ul li {
  width: 60%;
  text-align: justify;
}

.end {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  font-family: cursive;
}

h2 {
  padding: 1.5rem;
  text-align: center;
}

a:visited,
a:active {
  color: blue;
}


Your browser information:

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

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

Hi! Welcome to the forum!

The lesson says:

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

Your stylesheet link is this:

<link rel="stylesheet" href="c.css" />

Is the href correct? Without the correct href the css and html will not be linked, and even if your css is correct it won’t affect the html.

2 Likes

ahh cant believe i overlooked this
i was actually testing this code in vs code editor and hence my css filename was different and i pasted it from there directly
thank you ella
i feel like an idiot though😅

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