From 0d9214f272cadd08cc13b0702395e5ca9c483140 Mon Sep 17 00:00:00 2001 From: Brian Daley Date: Wed, 4 Mar 2020 11:11:27 -0500 Subject: [PATCH] further clarification --- README.md | 6 ++++-- css/style.css | 8 -------- index.html | 1 + js/fix-the-page.js | 24 ++++++------------------ 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e102eac..c2db795 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # DOM Playground ## Instructions -Modify `js/fix-the-page.js` to fix the page design and layout. When complete, your page should look like the original, "[Wicked Grove](http://www.csszengarden.com/006/)" design. +Fix the page design and layout by modifying the DOM. When complete, your page should look like the original, "[Wicked Grove](http://www.csszengarden.com/006/)" design. + +You'll need to look for the comments found in the `index.html` file. Follow the instructions in each comment, but do not modify the HTML or CSS file. All modifications must be done in JavaScript. Use the `js/fix-the-page.js` file for your DOM modifications. ## Rules 1) You may not modify the HTML file. @@ -22,5 +24,5 @@ This assignment is designed to test your knowledge of the following JavaScript f * `Array.forEach()` * The DOM * Object Literals `{}` -* and more ...! +* ... and more! diff --git a/css/style.css b/css/style.css index e2f1014..0dc5bbf 100644 --- a/css/style.css +++ b/css/style.css @@ -1,8 +1,4 @@ -/* Check the original CSS file for the correct body styles */ -/* It looks like they've been deleted from here. */ /* Remember, you cannot edit this file. Add the properties using JavaScript. */ -body {} - p { font: 10pt/16pt "Trebuchet MS", sans-serif; margin-top: 0px; @@ -36,7 +32,6 @@ a:active { } -/* Here's a class that you'll need to add to the HTML */ .page-wrapper { background: #9cf url(../images/trees.jpg) no-repeat left top; padding: 200px 0px 0px 0px; @@ -77,8 +72,6 @@ header h2 { overflow: hidden; } - -/* Add this class to the proper element */ .summary { width: 130px; float: left; @@ -130,7 +123,6 @@ footer a:visited { margin-right: 20px; } -/* This class is also missing from the HTML file. Add it! */ .sidebar { background: transparent url(../images/menu.gif) top left no-repeat; position: absolute; diff --git a/index.html b/index.html index a9573a4..c8febfd 100644 --- a/index.html +++ b/index.html @@ -214,6 +214,7 @@

Resources:

+ diff --git a/js/fix-the-page.js b/js/fix-the-page.js index a19da2d..2fe5133 100644 --- a/js/fix-the-page.js +++ b/js/fix-the-page.js @@ -1,33 +1,21 @@ /** * Use this javascript file to fix the page design and layout. - * - * Rules: - * 1) You may not modify the HTML file. - * 2) You may not modify the CSS file. - * - * You can begin by adding the classes mentioned in style.css to - * their appropriate elements in the HTML file. + * Reference the index.html comments for complete details. */ +// 1) Add CSS Properties to the body tag +// 2) Add the .page-wrapper class +// 3) Add the .summary class +// 4) Add the .sidebar class - - - -/** - * Here's the bad news: The resource links are missing from our HTML file. - * The good news: They're here in our JS file as an array of objects. - * - * 1) Use this array of objects to create new tags and append them to a new
  • . - * 2) Then take your new
  • and append it to ul#resourceList - * 3) The resulting markup should look like this:
  • innerHTML
  • - */ +// 5) Add these links to the "Resources"