Learn Accessibility by Building a Quiz - Step 8

Hello everyone kindly walk me through this; The instruction and my code are below respectively;

The instruction is;
A useful property of an SVG (scalable vector graphics) is that it contains a path attribute which allows the image to be scaled without affecting the resolution of the resultant image.

Currently, the img is assuming its default size, which is too large. CSS has a max function which returns the largest of a set of comma-separated values. For example:

img {
  width: max(250px, 25vw);
}

In this example, img elements will have a minimum width of 250px. And as the viewport grows, the image will grow accordingly to be 25 percent of the viewport width.

Scale the image using its id as a selector, and setting the width to be the maximum of 100px or 18vw.

#logo {
  width: max(100px, 18vw);
}

Hi @Answer_Alyosha

Your code for the logo id is correct.

Iā€™m not sure if you have a question.
At the moment, the logo color is white on a white background so maybe difficult to see clearly.

Later in the lesson the background color changes, which may make the svg more visible.

Let the forum know if you need anything.

Happy coding

3 Likes

Hello thanks for your response. It just did.

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