Question: Need help writing the code for this case study for Java Jam Ch.6 Case study book Web-Development and Design Foundation with HTML5 Version 8 You
Need help writing the code for this case study for Java Jam Ch.6 Case study book Web-Development and Design Foundation with HTML5 Version 8
You will modify the external style sheet and the Home, Menu, and Music pages. Use the Chapter 4 JavaJam website as a starting point for this case study. You have five tasks in this case study: 1. Create a new folder for this JavaJam case study. 2. Modify the style rules in the javajam.css file to configure a two-column page layout, as shown in Figure 6.49. 3. Modify the Home page to implement the two-column page layout, as shown in Figure 6.50. 4. Modify the Menu page (Figure 6.51) to be consistent with the Home page. 5. Modify the Music page (Figure 6.52) to be consistent with the Home page. Hands-On Practice Case Task 1: Create a Folder. Create a folder called javajam6. Copy all of the files from your Chapter 4 javajam4 folder into the javajam6 folder. Copy the heroroad.jpg, heromugs.jpg, and heroguitar.jpg files from the chapter6/starters folder. You will modify the javajam.css file and each web page file (index.html, menu.html, and music.html) to implement the two-column page layout shown in Figure 6.49. See the new JavaJam Home page, as shown in Figure 6.50. Task 2: Configure the CSS. Open javajam.css in a text editor. Edit the style rules as follows: 1. Configure the universal selector with a box-sizing: border-box style declaration. * { box-sizing: border-box; } Figure 6.50 The new JavaJam two-column layout (index.html) M06_FELK0746_03_SE_C06.indd 293 12/21/15 7:12 PM 294 Chapter 6 Page Layout 2. Configure id selectors for the hero image on each page. a. Configure an id selector named heroroad. Set the background image to heroroad. jpg. Configure 100% background-size and height of 250 pixels. b. Configure an id selector named heromugs. Set the background image to heromugs. jpg. Configure 100% background-size and height of 250 pixels. c. Configure an id selector named heroguitar. Set the background image to heroguitar. jpg. Configure 100% background-size and height of 250 pixels. 3. Edit the style rules for the main selector so that the hero image will fill the entire area. Change left padding to 0. Change right padding to 0. Also configure a 200px left margin, 0 top padding, and #FEF6C2 background color. 4. Since the main content area no longer has any left or right padding, configure descendant selectors to configure style rules for the following elements within the main element: h2, h3, h4, p, div, ul, dl. Set left padding to 3em and right padding to 2em. 5. Configure the left-column navigation area. Add style declarations to the nav element selector to configure an area that floats to the left and is 200 pixels wide. 6. Configure the :link, :visited, and :hover pseudo-classes for the navigation hyperlinks. Use the following text colors: #FEF6C2 (unvisited hyperlinks), #D2B48C (visited hyperlinks), and #CC9933 (hyperlinks with :hover). For example, nav a:link { color: #FEF6C2; } 7. You will organize the navigation hyperlinks within an unordered list in later tasks. The navigation area in Figure 6.50 does not show list markers. Code a nav ul descendant selector to configure unordered lists in the navigation area to display without list markers and with 0 left padding. 8. Modify the wrapper id. Configure a dark background color (#231814) which will display behind the column with the navigation area. 9. Modify the h4 element selector style rules. View the Music page shown in Figure 6.52 and notice that the
tags are styled differently, with all uppercase text (use text-transform), a bottom border, and 0 bottom padding. Also configure a style declaration to clear floats on the left. 10. Refer to the Music page shown in Figure 6.52 and notice how the images float on the left side of the paragraph description. Configure a new class named floatleft that floats to the left with 20 pixels of right and bottom padding. 11. Modify the style rules for the details class and add the overflow: auto; style declaration. 12. Add the following CSS to be compatible with most older browsers: header, nav, main, footer { display: block; } Save the javajam.css file. Task 3: The Home Page. Open index.html in a text editor. Edit the code as follows: 1. Add the following HTML5 shim code in the head section of the web page after the link element (to assist Internet Explorer 8 and earlier versions): M06_FELK0746_03_SE_C06.indd 294 12/21/15 7:12 PM 295Website Case Study 2. Configure the left-column navigation area, which is contained within the nav element. Remove any characters that may be present. Code an unordered list to organize the navigation hyperlinks. Each hyperlink should be contained within
tags. 3. Remove the img tag for the windingroad.jpg image. Configure a div element assigned to the heroroad id between the opening main tag and the opening h2 tag. There will be no HTML content in this div, which is a container for a background image you configured with CSS in Task 2. Save the index.html file. It should look similar to the web page shown in Figure 6.50. Remember that validating your HTML and CSS can help you find syntax errors. Test and correct this page before you continue. Task 4: The Menu Page. Open menu.html in a text editor. Configure the left-column navigation area, navigation hyperlinks, and HTML5 shim in the same manner as the home page. Remove the img tag for the mugs.jpg image. Configure a div element assigned to the heromugs id between the opening main tag and the opening h2 tag. Save your new menu.html page and test it in a browser. It should look similar to the web page shown in Figure 6.51. Use the CSS and HTML validators to help you find syntax errors. Figure 6.51 The new JavaJam Menu page Task 5: The Music Page. Open music.html in a text editor. Configure the left-column navigation area, navigation hyperlinks, and HTML5 shim in the same manner as the home page. Configure a div element assigned to the heroguitar id between the opening main tag and the opening h2 tag. M06_FELK0746_03_SE_C06.indd 295 12/21/15 7:12 PM 296 Chapter 6 Page Layout Configure the thumbnail images to float to the left. Add class="floatleft" to the image tag for each thumbnail image. Save your new music.html page and test it in a browser. It should look similar to the web page shown in Figure 6.52. Use the CSS and HTML validators to help you find syntax errors. In this case study, you changed the page layout of the JavaJam website. Notice that with just a few changes in the CSS and HTML code, you configured a two-column page layout.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
