add div and background color challenges

This commit is contained in:
Quincy Larson
2015-05-31 12:32:09 -07:00
parent 2deb79219d
commit db6fcf7de6
2 changed files with 21 additions and 17 deletions

View File

@ -2119,7 +2119,8 @@
"tests": [ "tests": [
"assert($('div').children('ol').length > 0, 'Wrap your <code>ol</code> element inside your <code>div</code> element.')", "assert($('div').children('ol').length > 0, 'Wrap your <code>ol</code> element inside your <code>div</code> element.')",
"assert($('div').children('p').length > 1, 'Wrap your <code>p</code> element inside your <code>div</code> element.')", "assert($('div').children('p').length > 1, 'Wrap your <code>p</code> element inside your <code>div</code> element.')",
"assert($('div').children('ul').length > 0, 'Wrap your <code>ul</code> element inside your <code>div</code> element.')" "assert($('div').children('ul').length > 0, 'Wrap your <code>ul</code> element inside your <code>div</code> element.')",
"assert(editor.match(/<\\/div>/g), 'Be sure that your <code>div</code> element has a closing tag.')"
], ],
"challengeSeed": [ "challengeSeed": [
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>", "<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
@ -2198,12 +2199,12 @@
"difficulty": 0.048, "difficulty": 0.048,
"description": [ "description": [
"Create a class called \"gray-background\" with the background color of gray. Assign this class to your <code>div</code> element.", "Create a class called \"gray-background\" with the background color of gray. Assign this class to your <code>div</code> element.",
"" "You can set an element's background color with the \"background-color\" attribute.",
"For example, if you wanted an element's background color to be \"green\", you'd use <code>.green-background { background-color: green; }</code>."
], ],
"tests": [ "tests": [
"assert($('div').children('ol').length > 0, 'Wrap your <code>ol</code> element inside your <code>div</code> element.')", "assert($('div').hasClass('gray-background'), 'Give your <code>div</code> element the class \"gray-background\".')",
"assert($('div').children('p').length > 1, 'Wrap your <code>p</code> element inside your <code>div</code> element.')", "assert($('.gray-background').css('background-color') === 'rgb(128, 128, 128)', 'Your <code>div</code> element should have a gray background.')"
"assert($('div').children('ul').length > 0, 'Wrap your <code>ul</code> element inside your <code>div</code> element.')"
], ],
"challengeSeed": [ "challengeSeed": [
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>", "<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
@ -2239,6 +2240,7 @@
"", "",
"<a href='#'><img class='smaller-image thick-green-border' src='https://bit.ly/fcc-kittens'/></a>", "<a href='#'><img class='smaller-image thick-green-border' src='https://bit.ly/fcc-kittens'/></a>",
"", "",
"<div>",
" <p>Things cats love:</p>", " <p>Things cats love:</p>",
" <ul>", " <ul>",
" <li>cat nip</li>", " <li>cat nip</li>",
@ -2251,6 +2253,7 @@
" <li>thunder</li>", " <li>thunder</li>",
" <li>other cats</li>", " <li>other cats</li>",
" </ol>", " </ol>",
"</div>",
"", "",
"<form action=\"/submit-cat-photo\">", "<form action=\"/submit-cat-photo\">",
" <label><input type='radio' name='indoor-outdoor' checked> Indoor</label>", " <label><input type='radio' name='indoor-outdoor' checked> Indoor</label>",

View File

@ -53,6 +53,7 @@ block content
.hidden-xs.col-sm-3.col-md-2.ion-locked.padded-ionic-icon.text-center.large-p.negative-10 .hidden-xs.col-sm-3.col-md-2.ion-locked.padded-ionic-icon.text-center.large-p.negative-10
.col-xs-12.col-sm-9.col-md-10 .col-xs-12.col-sm-9.col-md-10
li.large-p.negative-10 300-hour Nonprofit Project li.large-p.negative-10 300-hour Nonprofit Project
hr
for challengeBlock in challengeList for challengeBlock in challengeList
.row .row