Tribute Page - Build a Tribute Page

Tell us what’s happening:

When I enlarge the display page the image doesn’t enlarge, it stays stuck in the same place. And I can’t get my second p to go under the other one. What I´m doing wrong?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Agatha Christie biography" />
     
    <title id="title">Agatha Christie biography</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
     <header class="band">
      <h1 class="text">- Tribute Page -</h1>
      </header>
   <main id="main">
     <div class="font">
      <h1 class="principal">Agatha Christie</h1><link href="https://fonts.cdnfonts.com/css/dancing-script" rel="stylesheet">
      </div>          
      <p class="subtitle">The Queen of Mystery</p >
      <section>
        <div id="img-div">
  <img src="https://www.comumonline.com/wp-content/uploads/2024/09/The-Life-and-Disappearance-of-Agatha-Christie.jpeg" alt="Agatha between the books" id="image"  />
  <figcaption class="img-caption" id="img-caption">Agatha Christie, a time-proven author</figcaption>  
</section>
<section class="tribute-info"id="tribute-info">
  <h2>Agatha Christie's life timeline</h2>
        <ul>
          <li>Agatha Mary Clarissa Miller was born on <strong>September 15, 1890</strong></li>
          <li>She wrote a poem about the new streetcars that arrived in the London suburb of Ealing in <strong>1901</strong>, which was proudly published in the local magazine </li>
          <li>Agatha broke off her engagement to Reggie and married Archie on <strong>Christmas Eve 1914</strong>, whom she had met in 1912</li>
          <li>In <strong>1917</strong>, she completed the Worshipful Society of Apothecaries exam</li>
          <li>During the <strong>First World War</strong>, inspiration came for Hercule Poirot. The people of Torquay took in refugees, and Agatha thought that a Belgian refugee, a former great Belgian policeman, would be an excellent detective for <em>The Mysterious Affair at Styles</em> </li>
          <p> <em>“And he must be very clever - he must have little gray cells in his mind.” </em></p>
          <li><strong>1919</strong> Agatha gave birth to her only daughter, Rosalind. It was also the year that a publisher, John Lane of The Bodley Head, and the seventh to receive the manuscript, accepted <em>The Mysterious Affair at Styles</em></li>
          <li>The first novel Agatha wrote for Collins became one of the most famous murder mystery novels of all time. <em>The Murder of Roger Ackroyd</em> was published in <strong>1926</strong>, and with extremely impressive sales figures it was the book that defined Agatha's career</li>
          <li>At the end of <strong>1927</strong>, Agatha created an intriguing new amateur detective - Miss Jane Marple</li>
          <li>Finally accepting that her marriage was over, Agatha's divorce from Archie was granted in 1928</li>
          <li>At the end of <strong>1928</strong>, Agatha also wrote her first novel under the pseudonym Mary Westmacott , <em>Giant's Bread</em></li>
          <li>Max and Agatha were married on <strong>September 11, 1930</strong> at St Cuthbert's Church in Edinburgh</li>
          <li>In <strong>1938</strong>, she made the difficult decision to sell Ashfield, but only after falling in love with another property in Devon that she remembered from her childhood - Greenway</li>
          <li>In <strong>1947</strong>, Agatha was approached by the BBC to write a radio play for the 80th birthday of Queen Mary, who was an avid admirer of her work</li>
          <li>In <strong>1955</strong>, a solution to Agatha's tax worries presented itself when Agatha Christie Limited was formed and Agatha effectively became an employee</li>
          <li>After a hugely successful career and a very fulfilling life, Agatha died peacefully on <strong>January 12, 1976</strong>.</li>
        </ul>
</section> 
<footer>
   <p>For more information or curiosity, visit <a target="_blank" id="tribute-link" href="https://www.agathachristie.com/about-christie">THE HOME OF AGATHA CHRISTIE</a></p>
     <p class="copyright">Copyright &copy;2025</p>
   </footer>
</main>
    </body>
/* file: styles.css */
* {
  box-sizing: border-box;
}

body{
  margin:0;
  background-color:#f4f4f4; 
}

#image{
  display:block;
  align-items:center;
  max-width:100%;
  height: auto;
}

.img-caption{
  font-weight:bold;
  text-align:center;
  padding:3px;
  font-size:14px;
}

.band{
width: 100%;
height: 78px;
background-color: #373737;
display: flex;
align-items: center;
padding: auto ; 
}

.tribute-info{
  margin: 0 auto 10px auto;  
  padding:20px;  
}

ul > li{
  text-align:justify;
  font-size:18px;
  padding:9px;
}

.text{
  color:#C0B283;
  display:flex;
  margin-left: auto;
  margin-right: auto;
  font-size:29px;
  letter-spacing:1px; 
}

.subtitle{
  font-style:italic;
   text-align:center;
   font-size:18px;
}

section:last-of-type{
  width: 500%;
  margin: 0 auto 10px auto;
  max-width: 600px;
}

h1{
  font-size:35px;
  text-align:center;
}

.prinicpal{
  text-align:center;
}

.font{
  font-family: 'Dancing Script', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

footer{
  background-color: #373737;
  color:#C0B283;
  display:flex;
}

.copyright, footer{
align-items:center;
text-align:center;
}

a {
  color: black;
}

a:visited {
  color: black;
}

a:hover {
  color: #160e5c;
}

a:active {
  color: #160e5c;
}

Your browser information:

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

Challenge Information:

Tribute Page - Build a Tribute Page

If you set the width for the image to also be 100%, then that will resolve your issue

You set the footer to display flex.
The default direction will be row.
If you want to change the direction, then you will need to use the flex-direction property

Thanks, it worked! I still have some difficulty with the display attribute

which display? You use it in a few places.
can you provide a specific example of what you are struggling with and what you expect the desired outcome to be?

In .band I use display:flex and in #image I use display:block. I have some difficulty understanding why I use flex and not block and I can’t get it to fill the whole area of the page when I enlarge it, because it turns white

I am not really sure you need flex here. In that band class you just have the h1. And it looks like the desired result is for the band container to have a background color and some padding.

So I would personally simplify it to this:

.band {
  background-color: #373737;
  padding: 10px; 
}

I would need to see your updated code to better understand where the issue is

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Agatha Christie biography" />
     
    <title id="title">Agatha Christie biography</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
     <header class="band">
      <h1 class="text"> - Tribute Page -</h1>
      </header>
   <main id="main">
     <div class="font">
      <h1 class="principal">Agatha Christie</h1><link href="https://fonts.cdnfonts.com/css/dancing-script" rel="stylesheet">
      </div>          
      <p class="subtitle">The Queen of Mystery</p >
      <section>
        <div id="img-div">
  <img src="https://www.comumonline.com/wp-content/uploads/2024/09/The-Life-and-Disappearance-of-Agatha-Christie.jpeg" alt="Agatha between the books" id="image"  />
  <figcaption class="img-caption" id="img-caption">Agatha Christie, a time-proven author</figcaption>  
</section>
<section class="tribute-info"id="tribute-info">
  <h2>Agatha Christie's life timeline</h2>
        <ul>
          <li>Agatha Mary Clarissa Miller was born on <strong>September 15, 1890</strong></li>
          <li>She wrote a poem about the new streetcars that arrived in the London suburb of Ealing in <strong>1901</strong>, which was proudly published in the local magazine </li>
          <li>Agatha broke off her engagement to Reggie and married Archie on <strong>Christmas Eve 1914</strong>, whom she had met in 1912</li>
          <li>In <strong>1917</strong>, she completed the Worshipful Society of Apothecaries exam</li>
          <li>During the <strong>First World War</strong>, inspiration came for Hercule Poirot. The people of Torquay took in refugees, and Agatha thought that a Belgian refugee, a former great Belgian policeman, would be an excellent detective for <em>The Mysterious Affair at Styles</em> </li>
          <p> <em>“And he must be very clever - he must have little gray cells in his mind.” </em></p>
          <li><strong>1919</strong> Agatha gave birth to her only daughter, Rosalind. It was also the year that a publisher, John Lane of The Bodley Head, and the seventh to receive the manuscript, accepted <em>The Mysterious Affair at Styles</em></li>
          <li>The first novel Agatha wrote for Collins became one of the most famous murder mystery novels of all time. <em>The Murder of Roger Ackroyd</em> was published in <strong>1926</strong>, and with extremely impressive sales figures it was the book that defined Agatha's career</li>
          <li>At the end of <strong>1927</strong>, Agatha created an intriguing new amateur detective - Miss Jane Marple</li>
          <li>Finally accepting that her marriage was over, Agatha's divorce from Archie was granted in 1928</li>
          <li>At the end of <strong>1928</strong>, Agatha also wrote her first novel under the pseudonym Mary Westmacott , <em>Giant's Bread</em></li>
          <li>Max and Agatha were married on <strong>September 11, 1930</strong> at St Cuthbert's Church in Edinburgh</li>
          <li>In <strong>1938</strong>, she made the difficult decision to sell Ashfield, but only after falling in love with another property in Devon that she remembered from her childhood - Greenway</li>
          <li>In <strong>1947</strong>, Agatha was approached by the BBC to write a radio play for the 80th birthday of Queen Mary, who was an avid admirer of her work</li>
          <li>In <strong>1955</strong>, a solution to Agatha's tax worries presented itself when Agatha Christie Limited was formed and Agatha effectively became an employee</li>
          <li>After a hugely successful career and a very fulfilling life, Agatha died peacefully on <strong>January 12, 1976</strong>.</li>
        </ul>
</section> 
<footer>
   <p>For more information or curiosity, visit <a target="_blank" id="tribute-link" href="https://www.agathachristie.com/about-christie">THE HOME OF AGATHA CHRISTIE</a></p>
     <p class="band">Copyright &copy;2025</p>
   </footer>
</main>
    </body>
/* file: styles.css */
* {
  box-sizing: border-box;
}

body{
  margin:0;
  background-color:#f4f4f4; 
}

#image{
  display:block;
  align-items:center;
  max-width:100%;
  height: auto;
  width:100%;
  border-radius: 6px;
}

.img-caption{
  font-weight:bold;
  text-align:center;
  padding:3px;
  font-size:14px;
}

.band{
 background-color: #373737;
 padding: 10px ; 
 border-bottom: 4px solid #C0B283;
 color:#C0B283;
}

.tribute-info{
  margin: 0 auto 10px auto;  
  padding:20px;  
}

ul > li{
  text-align:justify;
  font-size:18px;
  padding:9px;
}

.text{
  margin-left: auto;
  margin-right: auto;
  font-size:29px;
  letter-spacing:1px; 
}

.subtitle{
  font-style:italic;
  text-align:center;
  font-size:18px;
}

section:last-of-type{
  width: 500%;
  margin: 0 auto 10px auto;
  max-width: 600px;
}

h1{
  font-size:35px;
  text-align:center;
}

.prinicpal{
  text-align:center;
}

.font{
  font-family: 'Dancing Script', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

footer{
  display:row;
  align-items:center;
  text-align:center;
}

a {
  color: #373737;
}

a:visited {
  color: #373737;
}

a:hover {
  color: #160e5c;
}

a:active {
  color: #160e5c;
}

That’s an issue with your last section.
it is creating a horizontal scroll bar

Your width is set to 500%

section:last-of-type{
  width: 500%;
  margin: 0 auto 10px auto;
  max-width: 600px;
}

It worked, thank you so much for your help!