diff --git a/seed_data/coursewares.json b/seed_data/coursewares.json
index e6970aa28b..d42436c381 100644
--- a/seed_data/coursewares.json
+++ b/seed_data/coursewares.json
@@ -779,9 +779,9 @@
"name": "Adjusting the Padding of an Element",
"difficulty" : "0.28",
"description": [
- "Change the padding
of the yellow box to 20 pixels.",
+ "Change the padding
of the green box to match that of the red box.",
"An element's padding
controls the amount of space between an element and its border
.",
- "Here, we can see that the green box and the red box and the green box are nested within the blue box.",
+ "Here, we can see that the green box and the red box and the green box are nested within the yellow box. Note that the red box has more padding
than the green box.",
"When you increase the green box's padding, it will increase the distance between the word \"padding\" and the border around the text."
],
"tests": [
@@ -801,8 +801,8 @@
" text-align: center;",
" }",
"",
- " .blue-box {",
- " background-color: blue;",
+ " .yellow-box {",
+ " background-color: yellow;",
" padding:10px;",
" }",
" ",
@@ -818,7 +818,7 @@
"",
"
margin
of the green box to match that of the red box.",
+ "An element's margin
controls the amount of space between an element's border
and surrounding elements.",
+ "Here, we can see that the green box and the red box and the green box are nested within the yellow box. Note that the red box has more margin
than the green box, making it appear smaller.",
+ "When you increase the green box's padding, it will increase the distance between its border and surrounding elements."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h1')).to.have.text('hello world');"
+ "expect($('.green-box')).to.have.css('margin', '20px')"
],
"challengeSeed": [
- "margin
of the green box to a negative value, so it fills the entire horizontal width of the blue box.",
+ "An element's margin
controls the amount of space between an element's border
and surrounding elements.",
+ "If you set an element's margin to a negative value, the element will grow larger.",
+ "Try to set the margin to a negative value like the one for the red box."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h1')).to.have.text('hello world');"
+ "expect($('.green-box')).to.have.css('margin', '-15px')"
],
"challengeSeed": [
- "padding-top
, padding-right
, padding-bottom
, and padding-left
attributes."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h1')).to.have.text('hello world');"
+ "expect($('.green-box')).to.have.css('padding-bottom', '20px')",
+ "expect($('.green-box')).to.have.css('padding-left', '40px')"
],
"challengeSeed": [
- "margin-top
, margin-right
, margin-bottom
, and margin-left
attributes."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h1')).to.have.text('hello world');"
+ "expect($('.green-box')).to.have.css('margin-bottom', '20px')",
+ "expect($('.green-box')).to.have.css('margin-left', '40px')"
],
"challengeSeed": [
- "Clockwise Notation
to give an element padding of 40 pixels on its top and left side, but only 20 pixels on its bottom and right side.",
+ "Instead of specifying an element's padding-top
, padding-right
, padding-bottom
, and padding-left
attributes, you can specify them all in one line, like this: padding: 10px 20px 10px 20px;
.",
+ "These four values work like a clock: top, right, bottom, left, and will produce the exact same result as using the side-specific padding instructions.",
+ "You can also use this notation for margins!"
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h1')).to.have.text('hello world');"
+ "expect($('.green-box')).to.have.css('margin-bottom', '20px')",
+ "expect($('.green-box')).to.have.css('margin-left', '40px')"
],
"challengeSeed": [
- "lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
", - "text-center
class to your h1 and h2 elements.",
- "Now that we're using Bootstrap, we can center our heading elements (h1 and h2) to make them look better. All we need to do is add the class text-center
to the h1 and h2 elements.",
+ "Add Bootstrap's text-center
class to your h2 element.",
+ "Now that we're using Bootstrap, we can center our heading elements (h2) to make them look better. All we need to do is add the class text-center
to the h1 and h2 elements.",
"Note that you can add several classes to the same element by seperating each of them with a space, like this: <h2 class=\"text-red text-center\">your text</h2>
."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
"expect($('h2')).to.have.class('text-center');"
],
"challengeSeed": [
"",
- "lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
", - "
.",
- "Now that we're using Bootstrap, we can center our heading elements (h1 and h2) to make them look better. All we need to do is add the class text-center
to the h1 and h2 elements.",
- "Note that you can add several classes to the same element by seperating each of them with a space, like this: <h2 class=\"text-red text-center\">your text</h2>
."
+ "Create a button with the text \"Delete\" using the HTML button
element.",
+ "HTML has special elements that function like links, but look like buttons. Let's creating a default HTML button."
],
"tests": [
- "expect($('h1')).to.have.class('text-center');",
- "expect($('h2')).to.have.class('text-center');"
+ "expect((/delete/gi).test($('button').text())).to.be.true;"
],
"challengeSeed": [
"",
- "lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
", - "btn
class to both of your buttons.",
+ "Bootstrap has its own button styles, which look much better than the plain HTML ones."
+ ],
+ "tests": [
+ "expect($('.btn').length).to.eql(2);"
+ ],
+ "challengeSeed": [
+ "",
+ "btn-block
class to both of your buttons.",
+ "Normally, your buttons are only as wide as the text they contain. By making them block elements
, your button will stretch to fill your page's entire horizontal space.",
+ "Note that these buttons still need the btn
class."
+ ],
+ "tests": [
+ "expect($('.btn-block').length).to.eql(2);"
+ ],
+ "challengeSeed": [
+ "",
+ "btn-block
class to both of your buttons.",
+ "Normally, your buttons are only as wide as the text they contain. By making them block elements
, your button will stretch to fill your page's entire horizontal space.",
+ "Note that these buttons still need the btn
class."
+ ],
+ "tests": [
+ "expect($('.btn-block').length).to.eql(2);"
+ ],
+ "challengeSeed": [
+ "",
+ "btn-primary
class to both of your buttons.",
+ "Bootstrap comes with several pre-defined colors for buttons. The btn-primary
class is the main button color you'll use throughout your app.",
+ "Note that these buttons still need the btn
and btn-block
classes."
+ ],
+ "tests": [
+ "expect($('.btn-primary').length).to.eql(2);"
+ ],
+ "challengeSeed": [
+ "",
+ "btn-primary
to btn-danger
.",
+ "Bootstrap comes with several pre-defined colors for buttons. The btn-danger
class is the button color you'll use to notify users that the button performs a destructive action, such as deleting a cat photo.",
+ "Note that this button still needs the btn
and btn-block
classes."
+ ],
+ "tests": [
+ "expect($('.btn-danger').length).to.eql(1);"
+ ],
+ "challengeSeed": [
+ "",
+ "<div class=\"row\">
element and each of them in a <div class=\"row\">
element.",
+ "Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div
element.",
+ "The row
class is applied to a div, and the buttons themselves can be nested
within it."
+ ],
+ "tests": [
+ "expect($('.row').length).to.eql(2);",
+ "expect($('.col-xs-12').length).to.eql(4);"
+ ],
+ "challengeSeed": [
+ "",
+ "cat photo app
",
+ "
",
+ "
",
+ "",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ "",
+ "",
+ "
",
+ ""
+ ],
+ "challengeType": 0
+ },
+
+ {
+ "_id" : "bad89fee1348ce8acef08812",
+ "name": "Wrap Side By Side Elements in a Bootstrap Row",
+ "difficulty" : "0.37",
+ "description": [
+ "Put the \"Like\" and \"Delete\" buttons side-by-side by wrapping them in both in a <div class=\"row\">
element and each of them in a <div class=\"row\">
element.",
+ "Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div
element.",
+ "The row
class is applied to a div, and the buttons themselves can be nested
within it."
+ ],
+ "tests": [
+ "expect($('.row').length).to.eql(2);",
+ "expect($('.col-xs-12').length).to.eql(4);"
+ ],
+ "challengeSeed": [
+ "",
+ "cat photo app
",
+ "
",
+ "
",
+ "",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ "",
+ "",
+ "
",
+ ""
],
"challengeType": 0
},