Tribute Page - Build a Tribute Page

Tell us what’s happening:

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.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
</head>
  <main id="main">
<body>
    <h1 id="title">Malala Yousafzai</h1>
  
  <div id="img-div">
<img id="image" src="https://cmg-cmg-tv-10090-prod.cdn.arcpublishing.com/resizer/ROur7KiZrK9qWgC4gBFkUrgg3cM=/800x0/filters:format(jpg):quality(70)/cloudfront-us-east-1.images.arcpublishing.com/cmg/OGB2BM7GURAR5HRM3FU6EZLM7A.jpg" alt="Malala"> 
</img>
<div id="img-caption">
<p>Malala Yousafzaiis a Pakistani female education activist. In 2014 she become the worlds youngest Nobel Prize laureate at age 17, and the second Pakistani and the first Pashtun to ever receive a Nobel Prize. She is known for human rights advocacy, especially the education of women and children in her native Swat, Khyber Pakhtunkhwa, where the Pakistani Taliban have at times banned girls from attending school. Her advocacy has grown into an international movement, and according to former Prime Minister Shahid Khaqan Abbasi, she has become Pakistan's "most prominent citizen."</p>
      </div>
      </div>
      <div id="tribute-info">
        <h2>Malala's Story</h2>
          <p>The daughter of education activist Ziauddin Yousafzai, she was born to a Yusufzai Pashtun family in Swat, and named after the Afghan national heroine, Malalai of Maiwand. Considering Abdul Ghaffar Khan, Barack Obama, and Benazir Bhutto as her role models, she was particularly inspired by her father's thoughts and humanitarian work. In early 2009, when she was 11, she wrote a blog under her pseudonym Gul Makai for the BBC Urdu to detail her life during the Taliban's occupation of Swat. The following summer, journalist Adam B. Ellick made a New York Times documentary about her life as the Pakistan Armed Forces launched Operation Rah-e-Rast against the militants in Swat. She rose in prominence, giving interviews in print and on television, and was nominated for the International Children's Peace Prize by activist Desmond Tutu.</p>

          <p>On 9 October 2012, while on a bus in Swat District after taking an exam, Yousafzai and two other girls were shot by a Taliban gunman in an assassination attempt in retaliation for her activism; the gunman fled the scene. Yousafzai was hit in the head with a bullet and remained unconscious and in critical condition at the Rawalpindi Institute of Cardiology, but her condition later improved enough for her to be transferred to the Queen Elizabeth Hospital in Birmingham, UK. The attempt on her life sparked an international outpouring of support for her. Deutsche Welle reported in January 2013 that she may have become "the most famous teenager in the world". Weeks after the attempted murder, a group of 50 leading Muslim clerics in Pakistan issued a fatwā against those who tried to kill her. The Pakistani Taliban were internationally denounced by governments, human rights organizations and feminist groups. The Pakistani Taliban officials responded to condemnation by further denouncing Yousafzai, indicating plans for a possible second assassination attempt, which they felt was justified as a religious obligation. Their statements resulted in further international condemnation.

            <p> 
              After her recovery, Yousafzai became a prominent activist for the right to education. Based in Birmingham, she co-founded the Malala Fund, a non-profit organisation, with Shiza Shahid. In 2013, she co-authored I Am Malala, an international best seller.In 2012, she received Pakistan's first National Youth Peace Prize and the 2013 Sakharov Prize. In 2014, she was the co-recipient of the 2014 Nobel Peace Prize, with Kailash Satyarthi of India. Aged 17 at the time, she was the youngest-ever Nobel Prize laureate. In 2015, she was the subject of the Oscar-shortlisted documentary He Named Me Malala. The 2013, 2014 and 2015 issues of Time magazine featured her as one of the most influential people globally. In 2017 she was awarded honorary Canadian citizenship and became the youngest person to address the House of Commons of Canada.

Yousafzai completed her secondary school education at Edgbaston High School, Birmingham in England from 2013 to 2017.From there she won a place at Oxford University and undertook three years of study for a Bachelor of Arts degree in Philosophy, Politics and Economics (PPE), as an undergraduate at Lady Margaret Hall, a college of the university. She graduated in 2020.</p>
     <h3>Continued Activism</h3>     
       <p>Yousafzai spoke before the United Nations in July 2013, and had an audience with Queen Elizabeth II in Buckingham Palace. In September, she spoke at Harvard University, and in October, she met with US President Barack Obama and his family; during that meeting, she confronted him on his use of drone strikes in Pakistan. In December, she addressed the Oxford Union. In July 2014, Yousafzai spoke at the Girl Summit in London. In October 2014, she donated $50,000 to the UNRWA for reconstruction of schools on the Gaza Strip.</p>
  <p>On 12 July 2015, her 18th birthday, Yousafzai opened a school in the Bekaa Valley, Lebanon, near the Syrian border, for Syrian refugees. The school, funded by the not-for-profit Malala Fund, offers education and training to girls aged 14 to 18 years. Yousafzai called on world leaders to invest in "books, not bullets".</p>

  <h4>Awards and Honors:</h4>
        <ul id="awards-list">
              <li>2011: International Children's Peace Prize (nominee)</li>
    <li>2011: National Youth Peace Prize</li>
    <li>January 2012: Anne Frank Award for Moral Courage</li>
    <li>October 2012: Sitara-e-Shujaat, Pakistan's second-highest civilian bravery award</li>
    <li>November 2012: Foreign Policy magazine top 100 global thinker</li>
    <li>December 2012: Time magazine Person of the Year shortlist for 2012</li>
    <li>November 2012: Mother Teresa Awards for Social Justice</li>
    <li>December 2012: Rome Prize for Peace and Humanitarian Action</li>
    <li>January 2013: Top Name in Annual Survey of Global English in 2012</li>
    <li>January 2013: Simone de Beauvoir Prize</li>
    <li>March 2013: Memminger Freiheitspreis 1525 (conferred on 7 December 2013 in Oxford</li>
    <li>March 2013: Doughty Street Advocacy award of Index on Censorship</li>
    <li>March 2013: Fred and Anne Jarvis Award of the UK National Union of Teachers</li>
    <li>April 2013: Vital Voices Global Leadership Awards, Global Trailblazer</li>
    <li>April 2013: One of Time's "100 Most Influential People in the World"</li>
    <li>May 2013: Premi Internacional Catalunya Award of Catalonia, May 2013</li>
    <li>June 2013: Annual Award for Development of the OPEC Fund for International Development (OFID)</li>
    <li>June 2013: International Campaigner of the Year, 2013 Observer Ethical Awards </li>
    <li>August 2013: Tipperary International Peace Award for 2012, Ireland Tipperary Peace Convention</li>
    <li>2013: Portrait of Yousafzai by Jonathan Yeo displayed at National Portrait Gallery, London</li>
    <li>September 2013: Ambassador of Conscience Award from Amnesty International</li>
    <li>2013: International Children's Peace Prize</li>
    <li>2013: Clinton Global Citizen Awards from Clinton Foundation</li>
    <li>September 2013: Harvard Foundation's Peter Gomes Humanitarian Award from Harvard University</li>
    <li>2013: Anna Politkovskaya Award – Reach All Women in War</li>
    <li>2013: Reflections of Hope Award – Oklahoma City National Memorial & Museum</li>
    <li>2013: Sakharov Prize for Freedom of Thought – awarded by the European Parliament</li>
    <li>2013: Honorary Master of Arts degree awarded by the University of Edinburgh</li>
    <li>2013: Pride of Britain (October)</li>
    <li>2013: Glamour magazine Woman of the Year</li>
    <li>2013: GG2 Hammer Award at GG2 Leadership Awards (November)</li>
    <li>2013: International Prize for Equality and Non-Discrimination</li>
    <li>2014: Awarded the World Children's Prize also known as Children's Nobel Prize</li>
    <li>2014: Awarded Honorary Life Membership by the PSEU (Ireland)</li>
    <li>2014: Skoll Global Treasure Award</li>
    <li>2014: Honorary Doctor of Civil Law, University of King's College, Halifax, Nova Scotia, Canada</li>
    <li>2014: 2014 Nobel Peace Prize, shared with Kailash Satyarthi</li>
    <li>2014: Philadelphia Liberty Medal</li>
    <li>2014: Asia Game Changer Award</li>
    <li>2014: One of Time Magazine "The 25 Most Influential Teens of 2014"</li>
    <li>2014: Honorary Canadian citizenship</li>
    <li>2015: Asteroid 316201 Malala named in her honour.</li>
    <li>2015: The audio version of her book I Am Malala wins Grammy Award for Best Children's Album.</li>
    <li>2016: Honorary President of The Students' Union of the University of Sheffield</li>
    <li>2016: Order of the Smile</li>
    <li>2017: Youngest ever United Nations Messenger of Peace</li>
    <li>2017: Received honorary doctorate from the University of Ottawa</li>
    <li>2017: Ellis Island International Medal of Honor</li>
   <li> 2017: Wonk of the Year 2017 from American University</li>
    <li>2017: Harper's Bazaar inducted Malala in the list of "150 of the most influential female leaders in the UK".</li>
    <li>2018: Advisor to Princess Zebunisa of Swat, Swat Relief Initiative Foundation, Princeton, New Jersey</li>
    <li>2018: Gleitsman Award from the Center for the Public Leadership at Harvard Kennedy School</li>
    <li>2019: For their first match of March 2019, the women of the United States women's national soccer team each wore a jersey with the name of a woman they were honoring on the back; Carli Lloyd chose the name of Yousafzai.</li>
    <li>2022: Elected World's Children's Prize Decade Child Rights Hero, amongst previous recipients of the World's Children's Prize.</li>
          </ul>
        </div>
        <div>
          <a id="tribute-link" href="https://en.wikipedia.org/wiki/Malala_Yousafzai" target="_blank">Learn more about Malala on Wikipedia</a>
          </div>
</body>
</main>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

Challenge: Tribute Page - Build a Tribute Page

MY CSS is this: (sorry if it’s super confusing, I was messing around with it and didn’t want to loose what was working, so there might be some doubles in there:

p, h1, h2, h3, h4 {
  color: white;
  text-align: center;
}

*  {
 height: auto;
  width: auto;
  justify-content: center;
  padding: 10px;
  border: auto;
}

body {
  background: #2d545e;
}
main > #img-div > #image {
 height: auto;
  max-width: 100%;
  box-shadow: 10px;
  border-radius: 5px #12343b;
  display: block;
		margin-left: auto;
		margin-right: auto;
		align-content: center;
}

ul {
  background-color: #fceed1;
  box-shadow: 4px 4px 4px;
  border-radius: 10px #12343b;
  padding:20px;
  text-align: center;
}

  img {
    display: block;
  }
  a {
    color: white;
  }

The problem I’m having is that all of the tests pass, but the last one says: Your #img should be centered within it’s parent. And I cannot understand what that means exactly. As I believe it is and have tried everything I know.

Link to the challenge:

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

i think this rule is messing things up for you.
Try targeting the body element instead of * (which means everything)

1 Like

Alright. That worked!
Although doesn’t look like it changed anything on the output or layout of the page, but I passed.
Thanks for the help and I’ll make sure next time I use the backticks on the code.

1 Like

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