Click here to view more cat photos.

Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
--- id: bad87fee1348bd9acdf08812 title: Size Your Images challengeType: 0 forumTopicId: 18282 dashedName: size-your-images --- # --description-- 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: ```html ``` # --instructions-- Create a class called `smaller-image` and use it to resize the image so that it's only 100 pixels wide. # --hints-- Your `img` element should have the class `smaller-image`. ```js assert( $("img[src='https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg']").attr('class') .trim().split(/\s+/g).includes('smaller-image') ); ``` Your image should be 100 pixels wide. ```js assert( $('img').width() < 200 && code.match(/\.smaller-image\s*{\s*width\s*:\s*100px\s*(;\s*}|})/i) ); ``` # --seed-- ## --seed-contents-- ```html
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate:
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: