# Assistance needed with this code please

**URL:** <https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057>\
**Category:** I Built This\
**Created:** [September 8, 2021, 1:08pm UTC](https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057 "2021-09-08T13:08:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alonski](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@alonski](https://forum.freecodecamp.org/u/alonski)\
**Post date:** [September 8, 2021, 1:08pm UTC](https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057/1 "2021-09-08T13:08:52Z")

</div>

```auto
<div id="main">
  <h1 id="title">A Cute Lion</h1>
  <div id="img-div">
    
    <a id="tribute-link" href="https:https://en.wikipedia.org/wiki/Lion" target="_blank">
    <img id="image" src="https://media.istockphoto.com/photos/male-lion-staking-prey-picture-id1226843930?b=1&k=20&m=1226843930&s=170667a&w=0&h=NQo_BrATB1MyevNJZY5NiS7Zee9VCLWeeU7stXVEz8w=" alt="A Cute Lion" width="20%" height="20%">
   </a>   
    <figcaption id="img-caption">The lion is a well-muscled cat with a long body, large head, and short legs. Size and appearance vary considerably between the sexes. The male's outstanding characteristic is his mane, which varies between different individuals and populations.</figcaption>
    
    
    <p id="tribute-info">
      
        
      <b>Characteristics of Lion:</b>
      <ul>
        <li>Bravery</li>
        <li>Strong</li>
        <li>King of the jungle</li>
      </ul>
        
    </p>
   
</div>
</div>

```

My score is 9/10, and I get this error message: The ![]() element should be centered within its parent element…

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [September 8, 2021, 2:18pm UTC](https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057/2 "2021-09-08T14:18:30Z")

</div>

I’ve edited your post 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.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [September 8, 2021, 2:23pm UTC](https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057/3 "2021-09-08T14:23:58Z")

</div>

Have you tried to center the element in its parent element?

I think there are a few oddities. Why is your list inside the “img-div”? I also wouldn’t use a `p` to wrap the list - at least a `div` would be better.

Is there CSS associate with this?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [March 10, 2022, 2:24am UTC](https://forum.freecodecamp.org/t/assistance-needed-with-this-code-please/477057/4 "2022-03-10T02:24:10Z")

</div>

Closed on March 10, 2022, 2:24am UTC

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