Tell us what’s happening:
how do i center my image within its parent
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.
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
<!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="freeCodeCamp Tribute page" />
<title id="title">Tribute Page for Mrs Helen Eyeh</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main id="main">
<h1 id="title">Tribute Page for Mrs Helen Eyeh</h1>
<p>My Proverbs 31 Woman</p>
<div id="img-div">
<img id="image"src="https://scontent-los2-1.xx.fbcdn.net/v/t1.6435-9/119130713_344867140225008_9083384455253558510_n.jpg?stp=dst-jpg_s600x600&_nc_cat=100&ccb=1-7&_nc_sid=8bfeb9&_nc_ohc=QjSObygkhdkAX-703Ya&tn=zrU10Fe895gqr5R4&_nc_ht=scontent-los2-1.xx&oh=00_AT8gUTBZMuULrVThgpbuQNiIIRTQa8wNnVbWSIrfbpnR9g&oe=63698D5A"/>
<figcaption id="img-caption">Mrs Helen Eyeh is a Nigerian from Asaga Ohafia the best mum </figcaption>
</div>
<div id="tribute-info">
<h3>Here is a time-line of Helen Eyeh: </h3>
<ul>
<li><strong>1965</strong> - Born in Nsukka, Nigeria</li>
<li><strong>1980</strong> - Leaves her family's farm to attend the University of Nsukka, thanks to a Depression era program known as the "National Youth Administration"</li>
<li><strong>1982</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", she said. "All of this left scars on me."</li>
<li><strong>1984</strong> Finishes university and takes a job in the US Forestry Service</li>
<li><strong>1991</strong> Marries husband of 53 years Sylvanus Eyeh. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, she returns to school study under Stakman, who teaches her about breeding pest-resistent plants.</li>
<li><strong>1993</strong> Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.</li>
<li><strong>1995</strong> Receives a Ph.D.in Genetics and Plant Pathology</li>
<li><strong>1997</strong>- Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent wheat - including different varieties for each major climate on Earth.</li>
<li><strong>1998</strong> Discovers a way to grown wheat twice each season, doubling wheat yields</li>
<li><strong>2001</strong> crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.</li>
<li><strong>2005</strong> Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</li>
<li><strong>2008</strong> Receives the Nobel Peace Prize</li>
<li><strong>2010</strong> Helps seven African countries dramatically increase their maize and sorghum yields</li>
<li><strong>2022</strong> Dies at 59
</ul>
<i>"Helen's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and scientific vision can make to human peace and progress."</i><br></br>
<i>-- Nigerian's Prime Minister Manmohan Singh</i>
</div>
<h4 id="tribute-info">If you have time, you should read more about this incredible human being on his <a id="tribute-link" target="_blank" href="https://en.wikipedia.org/wiki/Norman_Borlaug">Wikipedia entry</a>.</h4>
</main>
</body>
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.
Tell us what’s happening:
please i copied my code wrongly yesterday
please can you help delete it 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.
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
do you still need to delete it or do you need help still? (if you don’t need help you don’t have to delete the post, you can just say you don’t need help anymore)
you seem to have some padding of 15px being applied on the left hand side so it is throwing off the centering.
I found this by right-clicking the image and choosing the option “inspect” which opens up the developer tools in the browser. When I move my mouse on the img code in the inspection area, I can see the padding is being applied there.
well you have to center the image so the left and right side should be equal
Right now the left is 15 px but the right is 0 and they are not equal.
So you should think about how you want to change that so they become equal.
@hbar1st i have edited the img css to the code below and the instruction keeps saying that it has not been centered within the parent element… please can you give me a hint on this… Thank you