--- id: bad87fee1348bd9bedf08813 title: Add Borders Around Your Elements challengeType: 0 videoUrl: 'https://scrimba.com/c/c2MvnHZ' --- ## Description
CSS borders have properties like style, color and width. For example, if we wanted to create a red, 5 pixel border around an HTML element, we could use this class: ```html ```
## Instructions
Create a class called thick-green-border. This class should add a 10px, solid, green border around an HTML element. Apply the class to your cat photo. Remember that you can apply multiple classes to an element using its class attribute, by separating each class name with a space. For example: <img class="class1 class2">
## Tests
```yml tests: - text: Your img element should have the class smaller-image. testString: assert($("img").hasClass("smaller-image"), 'Your img element should have the class smaller-image.'); - text: Your img element should have the class thick-green-border. testString: assert($("img").hasClass("thick-green-border"), 'Your img element should have the class thick-green-border.'); - text: Give your image a border width of 10px. testString: assert($("img").hasClass("thick-green-border") && parseInt($("img").css("border-top-width"), 10) >= 8 && parseInt($("img").css("border-top-width"), 10) <= 12, 'Give your image a border width of 10px.'); - text: Give your image a border style of solid. testString: assert($("img").css("border-right-style") === "solid", 'Give your image a border style of solid.'); - text: The border around your img element should be green. testString: assert($("img").css("border-left-color") === "rgb(0, 128, 0)", 'The border around your img element should be green.'); ```
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```
## Solution
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```