From e0abcc085b25c8a21237b67e588199082bd0803d Mon Sep 17 00:00:00 2001 From: Hadrian Date: Fri, 28 Apr 2017 23:59:59 +0800 Subject: [PATCH] Reworked and Repositioned Attribute Selector Challenge (#13996) --- .../01-responsive-web-design/basic-css.json | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/challenges/01-responsive-web-design/basic-css.json b/challenges/01-responsive-web-design/basic-css.json index 335e34eea1..22f2647b99 100644 --- a/challenges/01-responsive-web-design/basic-css.json +++ b/challenges/01-responsive-web-design/basic-css.json @@ -2461,6 +2461,93 @@ } } }, + { + "id": "58c383d33e2e3259241f3076", + "title": "Use Attribute Selectors to Style Elements", + "description": [ + "You have been giving id or class attributes to elements that you wish to specifically style. These are known as ID and class selectors. There are other CSS Selectors you can use to select custom groups of elements to style.", + "Let's bring out CatPhotoApp again to practice using CSS Selectors.", + "For this challenge, you will use the [attr=value] attribute selector to style the checkboxes in CatPhotoApp. This selector matches and style elements with a specific attribute value. For example, the below code changes the margins of all elements with the attribute type and a corresponding value of radio:", + "
[type='radio'] {
margin: 20px 0px 20px 0px;
}
", + "
", + "Using the type attribute selector, try to give the checkboxes in CatPhotoApp a top margin of 10px and a bottom margin of 15px." + ], + "challengeSeed": [ + "", + "", + "", + "

CatPhotoApp

", + "
", + "

Click here to view more cat photos.

", + " ", + " \"A", + " ", + "
", + "

Things cats love:

", + "
    ", + "
  • cat nip
  • ", + "
  • laser pointers
  • ", + "
  • lasagna
  • ", + "
", + "

Top 3 things cats hate:

", + "
    ", + "
  1. flea treatment
  2. ", + "
  3. thunder
  4. ", + "
  5. other cats
  6. ", + "
", + "
", + " ", + "
", + " ", + "
", + " ", + " ", + "
", + " ", + " ", + "
", + "
" + ], + "tests": [ + "assert(code.match(/