freeCodeCamp Error Tribute Page

Hello everyone, I am almost done with my tribute page code but I am stuck with the following:

  1. Your img element should have a display of block
  2. Your #image should have a max-width of 100%
  3. Your #image should be centered within its parent
    This my code:
  font-family: 'Source Sans Pro', sans-serif;
}

h1 {
  text-align: center;
  font-size: 64px;
  text-transform: uppercase;
}

.container {
  display: flex;
}

#img-div {
  flex: 1;
}

#tribute-info {
  flex: 1;
  font-size: 20px;
}

#image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}
type or paste code here
1 Like

Hi again!

Did you follow this part of the instructions for your html?
Note: Be sure to add <link rel="stylesheet" href="styles.css"> in your HTML to link your stylesheet and apply your CSS

2 Likes

Also as a sidenote, it looks like you are trying to use the shorthand property here

and margin-bottom here

Since you are using the shorthand property first, I would delete the margin-bottom and adjust the shorthand margin.

margin: 0 auto 10px;

With three values, the first margin applies to the top , the second to the right and left , the third to the bottom.

Wow Thanks Sis. It’s Work, after add link rel css

1 Like

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