Image tribute page

I am new to coding working on the legacy responsive webpage project and can’t get image to work, although it says my height of auto is correct. My full code and instructions below:

Your img element should have a display of block

Your #image should have a max-width of 100%

Your #image should have a height of auto

Your #image should be centered within its parent

Html code:

 font-family: calibri;

<main id="main">

<h1 id="title">Tyler, the Creator</h1>

<figure id="img-div">

<img id="image" src=",f_auto,q_auto,fl_lossy/wp-cms/uploads/2018/10/p-2-a-creator-in-bloom-FA1118TYLE001.jpg" alt="Tyler, the Creator posing">

<figcaption id="img-caption">
Tyler, the Creator c. 2017

<div id="info">
  <div id="tribute-info">
      Tyler Gregory Okonma, professionally known as Tyler, the Creator, is an American rapper and record producer. Following a large contribution to Odd Future's early work, Tyler released his debut solo mixtape, Bastard, in 2009.After releasing his debut studio album, Goblin, via XL Recordings in April 2011, he signed a joint deal with RED Distribution and Sony Music Entertainment for himself and his label, Odd Future Records.</p>

   <a href="" id="tribute-link" target="_blank">
   <div class="out">
     <div class="in">
       <p>LEARN MORE</p>
</main >

  <a href="" id="tribute-link" target="_blank">
  <div class="out">
    <div class="in">
      <p>LEARN MORE</p>

Css code:
max-width: 100%;
height: auto;
display: block;

You forgot to close this with a curly brace }.

Also, keep in mind that your image needs to be centered within its parent. After these adjustments it may or may not be centered.

1 Like

Sorry for the late reply, but the curly brace is on there I just missed while copying and pasting to the forum and it is still wrong. is there anything else that I could have missed? sorry I am still all new to this

Hi @genraag !

Welcome to the forum!

Did you properly link your css to the html document?

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