Accessibility Quiz Step 9

#logo {

  width: max(100px, 18vw);

  background-color: #0a0a23;

  aspect-ratio: 875%;

  padding: 0.4rem;

}

When trying to submit my code for changing the aspect ratio of the logo its telling me to use the aspect-ratio property which I believe I am using correctly? If not could someone guide me in the right direction?

I believe the issue is the value you used: 875%
That’s a massive number the aspect ratio element may not accept being that high of a percentage when we use a percentage. Try adding a dot?

87.5%

Here are some reference info links for the aspect-ratio element:

This article explains how to do the calculations to get the aspect ratio we want:

I don’t personally agree with using the padding property to do it as the second link examples but it is a way to do it. As long as it works there’s nothing wrong with how it’s done IMHO (in my humble opinion).

Turns out I can directly apply the aspect ratio like this:
aspect-ratio: 35/4; Thanks for the sources!

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