I do not understand the syntax of this challenge, how should I write it?

Responsive Web DesignBasic CSS

Size Your Images

CSS has a property called width that controls an element’s width. Just like with fonts, we’ll use px (pixels) to specify the image’s width.

For example, if we wanted to create a CSS class called larger-image that gave HTML elements a width of 500 pixels, we’d use:

<style>
  .larger-image {
    width: 500px;
  }
</style>

I don’t understand how I should write the statement to execute the class heeeelp!

Inside the <style> tags you’ll want to create a new rule for the class smaller-image. Inside of that rule you’ll want to set the width to 100px. You can use the larger-image example above as a reference for how to do that.

After you have created the new rule then you’ll need to add the class to the <img> so that it is resized accordingly.

If you still have questions then please let us know but be very specific about what you don’t understand.

1 Like

thanks brother, just after posting I started looking here and found an example!

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