{ "name": "Bootstrap", "order" : 0.003, "challenges": [ { "_id": "bad87fee1348bd9acde08812", "name": "Use Bootstrap for Responsive Images", "difficulty": 0.047, "description": [ "Add a new image with the src attribute of \"http://bit.ly/fcc-kittens2\", and add the img-responsive Bootstrap class to the image.", "Specifying a width of 200 pixels on our img element made it fit our phone's screen, but it's not a perfect fit. It would be great if the image could be exactly the width of our phone's screen.", "Fortunately, there's a Responsive CSS Framework called written by Twitter called Bootstrap. You can add Bootstrap to any app just by including it with <link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'/> at the top of your HTML, but we've gone ahead and included it for you here.", "Bootstrap will figure out how wide your screen is and respond by resizing your HTML elements - hence the name Responsive Design.", "Now all you need to do is add the img-responsive class to your image." ], "tests": [ "assert($('img').hasClass('img-responsive'), 'Your new image should have the class \"img-responsive\"')", "assert($('img').length > 1, 'You should add an image with the src of \"http://bit.ly/fcc-kittens2\"')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348bd8acde08812", "name": "Center Text with Bootstrap", "difficulty": 0.048, "description": [ "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 separating each of them with a space, like this: <h2 class=\"text-red text-center\">your text</h2>." ], "tests": [ "assert($('h2').hasClass('text-center'), 'Your h2 element should be centered by applying the class \"text-center\"')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348cd8acdf08812", "name": "Create a Bootstrap Button", "difficulty": 0.049, "description": [ "Create a new button below your large kitten photo with the class \"btn\" and the text of \"like this photo\".", "Bootstrap has its own button styles, which look much better than the plain HTML ones." ], "tests": [ "assert($('.btn').length > 0, 'your new button should have the class \"btn\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348cd8acef08812", "name": "Create a Block Element Bootstrap Button", "difficulty": 0.050, "description": [ "Add Bootstrap's btn-block class to your Bootstrap button.", "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": [ "assert($('.btn-block').length > 0, 'your new button should have the class \"btn-block\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348cd8acef08811", "name": "Color a Bootstrap Button with Button Primary", "difficulty": 0.051, "description": [ "Add Bootstrap's 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": [ "assert($('.btn-primary').length > 0, 'your new button should have the class \"btn-primary\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348cd8acef08813", "name": "Color a Bootstrap Button with Button Info", "difficulty": 0.052, "description": [ "Create a new block-level Bootstrap button below your \"like\" button with the text \"Info\", and add Bootstrap's btn-info class to it.", "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": [ "assert($('.btn-info').length > 0, 'your new button should have the class \"btn-info\".')", "assert($('.btn-block').length > 1, 'Both of your Bootstrap buttons should have the class \"btn-block\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad87fee1348ce8acef08814", "name": "Warn your Users of a Dangerous Action with the Bootstrap Button Danger Class", "difficulty": 0.053, "description": [ "Create a button with the text \"delete\" and give it the class 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": [ "assert($('.btn-danger').length > 0, 'Your new button should have the class \"btn-danger\".')", "assert($('.btn-block').length > 1, 'Both of your Bootstrap buttons should have the class \"btn-block\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id": "bad88fee1348ce8acef08815", "name": "Use the Bootstrap Grid to Put Elements Side By Side", "difficulty": 0.054, "description": [ "Put the \"like\", \"Info\" 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=\"col-xs-4\"> 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": [ "assert($('.row').length > 0, 'Your new button should be wrapped within a div with the class \"row\".')", "assert($('.col-xs-4').length > 2, 'Each of your bootstrap buttons should be wrapped in a div with the class \"col-xs-4\".')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "", "", "", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aedf08845", "name": "Use Bootstrap Text Primary Class instead of Custom CSS", "difficulty" : 0.055, "description": [ "Delete the following from your style tag: .red-text, p, .smaller-image. Delete the p element with the dead link. Remove your red-text class from your h2 element and instead apply the text-primary Bootstrap class. Replace the smaller-image class on your top image with the img-responsive class." ], "tests": [ "assert(!$('h2').hasClass('red-text'), 'You h2 element should no longer have the class \"red-text\".')", "assert($('h2').hasClass('text-primary'), 'You h2 element should now have the class \"text-primary\".')", "assert(!$('p').css('font-family').match(/monospace/i), 'Your paragraph elements should no longer use the font \"Monospace\".')", "assert($('.img-responsive').length > 1, 'Remove the \"smaller-image\" class from your top image and replace it with the \"img-responsive\" class.')" ], "challengeSeed": [ "", "", "", "

CatPhotoApp

", "", "

Click here for cat photos.

", "", "", "", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aede08845", "name": "Create a Custom Heading", "difficulty" : 0.056, "description": [ "Wrap your first image and your h2 element in a <div class='row'> element. Wrap your h2 text in a <div class='col-xs-8'> and your image in a <div class='col-xs-4'> so that they are on the same line." ], "tests": [ "assert($('.row').length > 1, 'Your h2 and top image elements should both be wrapped together within a div with the class \"row\".')", "assert($('.col-xs-4').length > 3, 'Wrap your top image inside a div with the class \"col-xs-4\".')", "assert($('.col-xs-8').length > 0, 'Wrap your h2 element inside a div with the class \"col-xs-8\".')" ], "challengeSeed": [ "", "", "", "", "

CatPhotoApp

", "", "", "", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aedd08845", "name": "Add Font Awesome Icons to our Buttons", "difficulty" : 0.057, "description": [ "Use Font Awesome to add a \"like\" icon to your like button.", "You should add a <i class=\"fa fa-thumbs-up\"> within your like button's element." ], "tests": [ "assert($('.fa-thumbs-up').length > 0, 'You should add a <i class=\"fa fa-thumbs-up\"><i> within your like button element.')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aedc08845", "name": "Add Font Awesome Icons all of our Buttons", "difficulty" : 0.058, "description": [ "Use Font Awesome to add a \"info-circle\" icon to your info button and a \"trash\" button to your delete button.", "You should add a <i class=\"fa fa-thumbs-up\"> within your like button's element." ], "tests": [ "assert($('.fa-trash').length > 0, 'You should add a <i class=\"fa fa-trash\"><i> within your like button element.')", "assert($('.fa-info-circle').length > 0, 'You should add a <i class=\"fa fa-info-circle\"><i> within your like button element.')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aedb08845", "name": "Use Bootstrap to Responsively Style a Radio Buttons", "difficulty" : 0.059, "description": [ "Wrap all of your radio buttons in a <div class='row'> element. Then wrap each of them in a <div class='col-xs-6'> element." ], "tests": [ "assert($('.row').length > 2, 'Wrap your all of your radio buttons inside one div with the class \"row\".')", "assert($('.col-xs-6').length > 3, 'Wrap each of your radio buttons inside its own div with the class \"col-xs-6\".')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", " ", " ", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aeda08845", "name": "Use Bootstrap to Responsively Style Checkboxes", "difficulty" : 0.060, "description": [ "Wrap all your checkboxes in a <div class='row'> element. Then wrap each of them in a <div class='col-xs-4'> element." ], "tests": [ "assert($('.row').length > 3, 'Wrap your all of your checkboxes inside one div with the class \"row\".')", "assert($('.col-xs-4').length > 6, 'Wrap each of your checkboxes inside its own div with the class \"col-xs-4\".')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", "
", "
", " ", "
", "
", " ", "
", "
", "
", " ", " ", " ", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aed908845", "name": "Style a Text Input with the Bootstrap Form Control Class", "difficulty" : 0.061, "description": [ "Give your form's text input field in a class of \"form-control\". Give your form's submit button the classes \"btn btn-primary\" and give it the Font Awesome icon of \"fa-paper-plane\"." ], "tests": [ "assert($('.btn-primary').length > 1, 'Give your form's submit button the classes \"btn btn-primary\".')", "assert($('.fa-paper-plane').length > 0, 'You should add a <i class=\"fa fa-paper-plane\"><i> within your submit button element.')", "assert($('.form-control').length > 0, 'Give your form's text input field in a class of \"form-control\".')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", "
", "
", "
", " ", "
", "
", " ", "
", "
", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "
", " ", " ", "
" ] }, { "_id" : "bad87fee1348bd9aec908845", "name": "Line up Form Elements Responsively with Bootstrap", "difficulty" : 0.062, "description": [ "Wrap both your form's text input field and submit button within a div with the class \"row\". Wrap your form's text input field within a div with the class of \"col-xs-7\". Wrap your form's submit button the in a div with the class \"col-xs-5\"." ], "tests": [ "assert($('.row').length > 4, 'Wrap your all of your checkboxes inside one div with the class \"row\".')", "assert($('.col-xs-5').length > 0, 'Wrap each of your checkboxes inside its own div with the class \"col-xs-4\".')", "assert($('.col-xs-7').length > 0, 'Wrap each of your checkboxes inside its own div with the class \"col-xs-4\".')" ], "challengeSeed": [ "", "", "", "
", "
", "

CatPhotoApp

", "
", "
", " ", "
", "
", "
", "", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "

Things cats love:

", "", "

Top 3 things cats hate:

", "
    ", "
  1. flea treatment
  2. ", "
  3. thunder
  4. ", "
  5. other cats
  6. ", "
", "
", "
", "
", "
", " ", "
", "
", " ", "
", "
", "
", "
", "
", " ", "
", "
", " ", "
", "
", " ", "
", "
", "
", " ", " ", "
" ] }, { "_id": "bad88fee1348bd9aedf08825", "name": "Adjusting the Padding of an Element", "difficulty": 0.064, "description": [ "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 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": [ "expect($('.green-box')).to.have.css('padding', '20px')" ], "challengeSeed": [ "", "
margin
", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1348bd9aedf08822", "name": "Adjust the Margin of an Element", "difficulty": 0.065, "description": [ "Change the 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($('.green-box')).to.have.css('margin', '20px')" ], "challengeSeed": [ "", "
margin
", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1348bd9aedf08823", "name": "Add a Negative Margin to an Element", "difficulty": 0.066, "description": [ "Change the 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($('.green-box')).to.have.css('margin', '-15px')" ], "challengeSeed": [ "", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1348bd9aedf08824", "name": "Add Different Padding to Each Side of an Element TEST", "difficulty": 0.067, "description": [ "Give the green box a padding of 40 pixels on its top and left side, but only 20 pixels on its bottom and right side.", "Sometimes you will want to customize an element so that it has different padding on each of its sides.", "CSS allows you to control the padding of an element on all four sides with padding-top, padding-right, padding-bottom, and padding-left attributes." ], "tests": [ "expect($('.green-box')).to.have.css('padding-bottom', '20px')", "expect($('.green-box')).to.have.css('padding-left', '40px')" ], "challengeSeed": [ "", "
margin
", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1248bd9aedf08824", "name": "Add Different a Margin to Each Side of an Element TEST", "difficulty": 0.068, "description": [ "Give the green box a margin of 40 pixels on its top and left side, but only 20 pixels on its bottom and right side.", "Sometimes you will want to customize an element so that it has a different margin on each of its sides.", "CSS allows you to control the margin of an element on all four sides with margin-top, margin-right, margin-bottom, and margin-left attributes." ], "tests": [ "expect($('.green-box')).to.have.css('margin-bottom', '20px')", "expect($('.green-box')).to.have.css('margin-left', '40px')" ], "challengeSeed": [ "", "
margin
", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1348bd9aedf08826", "name": "Use Clockwise Notation to Specify an Element's Padding", "difficulty": 0.069, "description": [ "Use 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($('.green-box')).to.have.css('margin-bottom', '20px')", "expect($('.green-box')).to.have.css('margin-left', '40px')" ], "challengeSeed": [ "", "
margin
", "", "
", "
padding
", "
padding
", "
" ] }, { "_id": "bad87fee1348bd9aede08826", "name": "Use Hex Codes for Precise Colors", "difficulty": 0.070, "description": [ ], "tests": [ ], "challengeSeed": [ ] }, { "_id": "bad87fee1348bd9aedd08826", "name": "Use Shortened Hex Codes for Colors", "difficulty": 0.071, "description": [ ], "tests": [ ], "challengeSeed": [ ] } ] }