@ -1110,8 +1110,9 @@
|
||||
"Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link."
|
||||
],
|
||||
"tests": [
|
||||
"expect($('a').children('img').length, 'Wrap your image element inside an anchor element that has its <code>href</code> attribute set to \"#\"').to.equal(1);",
|
||||
"expect(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Make sure to specify the \"src\" attribute as \"#\"').to.be.true;"
|
||||
"assert(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Your <code>anchor</code> element should be a dead link with a <code>href</code> attribute set to \"#\".')",
|
||||
"assert($('a').children('img').length > 0, 'Wrap your image element inside an anchor element.')",
|
||||
"assert(editor.match(/<\\/a>/g).length > 1, 'Be sure that each of your <code>a</code> elements has a closing tag.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||
@ -1512,7 +1513,9 @@
|
||||
],
|
||||
"tests": [
|
||||
"assert($('form').length > 0, 'Wrap your text input element within a <code>form</code> element.')",
|
||||
"assert($('form').attr('action'), 'Your <code>form</code> element should have an <code>action</code> attribute.')"
|
||||
"assert($('form').attr('action'), 'Your <code>form</code> element should have an <code>action</code> attribute.')",
|
||||
"assert(editor.match(/<\\/form>/g), 'Make sure your <code>form</code> elements has a closing tag.')",
|
||||
"assert(editor.match(/\\/submit-cat-photo/ig), 'Make sure your <code>form</code> action is set to <code>/submit-cat-photo</code>.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||
@ -2113,7 +2116,7 @@
|
||||
"description": [
|
||||
"Change the <code>margin</code> of the green box to match that of the red box.",
|
||||
"An element's <code>margin</code> controls the amount of space between an element's <code>border</code> 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 <code>margin</code> than the green box, making it appear smaller.",
|
||||
"Here, we can see that the green box and the red box are nested within the yellow box. Note that the red box has more <code>margin</code> than the green box, making it appear smaller.",
|
||||
"When you increase the green box's <code>margin</code>, it will increase the distance between its border and surrounding elements."
|
||||
],
|
||||
"tests": [
|
||||
|
@ -690,7 +690,7 @@
|
||||
"name": "Waypoint: Ditch Custom CSS for Bootstrap",
|
||||
"difficulty": 0.055,
|
||||
"description": [
|
||||
"Delete the following from your style tag: <code>.red-text</code>, <code>p</code>, <code>.smaller-image</code>. Delete the <code>p</code> element with the dead link. Remove your <code>red-text</code> class from your <code>h2</code> element and instead apply the <code>text-primary</code> Bootstrap class. Replace the <code>smaller-image</code> class on your top image with the <code>img-responsive</code> class.",
|
||||
"<ol><li>Delete <code>.red-text</code>, <code>p</code>, and <code>.smaller-image</code> from your <code>style</code> element.</li> <li>Delete the <code>p</code> element that contains the dead link.</li> <li>Remove the <code>red-text</code> class from your <code>h2</code> element and replace it with the <code>text-primary</code> Bootstrap class.</li> <li>Remove the <code>smaller-image</code> class from your first <code>img</code> element and replace it with the <code>img-responsive</code> class.</li></ol>",
|
||||
"We can clean up our code and make our Cat Photo App look more conventional by using Bootstrap's built-in styles instead of the custom styles we created earlier.",
|
||||
"Don't worry - there will be plenty of time to customize our CSS later."
|
||||
],
|
||||
@ -881,7 +881,9 @@
|
||||
"Go ahead and add a <code><i class=\"fa fa-thumbs-up\"></i></code> within your like button's element."
|
||||
],
|
||||
"tests": [
|
||||
"assert($('.fa-thumbs-up').length > 0, 'You should add a <code><i class=\"fa fa-thumbs-up\"></i></code> within your like button element.')"
|
||||
"assert($('.fa-thumbs-up').length > 0, 'Add a <code>i</code> element with the classes \"fa\" and \"fa-thumbs-up\".')",
|
||||
"assert($('button').children('i').length > 0, 'Wrap your <code>i</code> element within your <code>button</code> element.')",
|
||||
"assert(editor.match(/<\\/i>/g), 'Be sure to close your <code>i</code> element with a closing tag.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||
|
Reference in New Issue
Block a user