Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have the following tasks: 1. Create a new folder for this JavaJam case study. 2. Create an external style sheet named javajam.css that configures
You have the following tasks: 1. Create a new folder for this JavaJam case study. 2. Create an external style sheet named javajam.css that configures the color and text for the JavaJam website. 3. Modify the Home page to utilize an external style sheet to configure colors and fonts. The new Home page and color swatches are shown in Figure 3.290 Figure 3.29 New JavaJam index.html Javalam Coffee Bar + #221811 JavaJam Coffee Bar #FCEBB6 Home Menu Music Jobs Relax at JavaJam Friendly and eclectic - JavaJam Coffee Bar is the perfect place to take a break, enjoy a refreshing beverage, and have a snack or light meal. #D2B48C Specialty Coffee and Organic Tea Bagels, Muffins, and Gluten-free Pastries Organic Salads Music and Poetry Readings Open Mic Night #8C3826 12010 Garrett Bay Road Ellison Bay, WI 54210 888-555-5555 #FEFAEB Copyright 2020 Javalam Coffee Bar yourfirstname@yourfastname.com 4. Modify the Menu page to be consistent with the new Home page. 5. Configure centered page layout. TASK 1: THE WEBSITE FOLDER. Create a folder on your hard drive or portable storage device called javajamcss. Copy all the files from your Chapter 20 javajam folder into the javajamcss folder. TASK 2: THE EXTERNAL STYLE SHEET. You will use a text editor to create an external style sheet named javajam.css. Code the CSS to configure the following: 1. Global styles for the document (use the body element selector) with background color #FCEBB6; text color #221811; and Tahoma, Arial, or any sans-serif font. 2. Styles for the header element selector that configure text color #8C3826, background color #D2B48C, and centered text. 3. Styles for the h1 element selector that configure 200% line height. 4. Styles for the h2 element selector that configure #8C3826 text color. 5. Styles for the nav element selector that configure centered, bold text. Hint: Use the CSS text-align and font-weight properties. 6. Styles for the footer element selector that configure background color #D2B48C, small font size (.60em), italics, and centered text. Save the file as javajam.css in the javajamcss folder. Check your syntax with the CSS validator (http://jigsaw.w3.org/css-validator). Correct and retest if necessary. TASK 3: THE HOME PAGE. Launch a text editor, and open the index.html file. You will modify this file to apply styles from the javajam.css external style sheet as follows: 1. Add a element to associate the web page with the javajam.css external style sheet file. 2. Configure the navigation area. Remove the elements which are no longer needed because you have configured bold text with CSS. 3. Configure the page footer area. Remove the and elements, they are no longer needed since CSS is now used to configure the text. Save the index.html file, and test it in a browser. Your page should look similar to the one shown in Figure 3.290 except that the background color and alignment of your page content is different. Don't worry-you'll center your page layout in Task 5 of this case study. TASK 4: THE MENU PAGE. Launch a text editor, and open the menu.html file. You will modify this file in a similar manner as you modified the home page: Add the element and configure the navigation and page footer areas. Save and test your new menu.html page. It should look similar to the one shown in Figure 3.300, except for the background and alignment. Figure 3.30 New menu.html page JavaJam Coffee Bar Menu + - { * III JavaJam Coffee Bar Home Menu Music Jobs Coffee at JavaJam Just Java Regular house blend, decaffeinated coffee, or flavor of the day. Endless Cup $3.50 Cafe au Lait House blended coffee infused into a smooth, steamed milk. Single $4.00 Double $5.00 Iced Cappuccino Sweetened espresso blended with icy-cold milk and served in a chilled glass. Single $5.00 Double $6.50 Copyright 2020 JavaJam Coffee Bar yourfirstname@yourlastname.com TASK 5: CENTER PAGE LAYOUT WITH CSS. Modify javajam.css, index.html, and menu.html to configure page content that is centered with 80% width (refer to Hands-On Practice 3.90 if necessary): 1. Launch a text editor, and open the javajam.css file. Add a style rule for an id named wrapper with width set to 80%, #FEFAEB background color, margin-right set to auto, and margin-left set to auto. 2. Launch a text editor, and open the index.html file. Add the HTML code to configure a div element assigned to the id wrapper that "wraps," or contains, the code within the body section. Save and test your index.html page in a browser and you'll notice that the page content is now centered within the browser viewport as shown in Figure 3.290. 3. Launch a text editor, and open the menu.html file. Add the HTML code to configure a div element assigned to the id wrapper that "wraps," or contains, the code within the body section. Save and test your menu.html page in a browser and you'll notice that the page content is now centered within the browser viewport as shown in Figure 3.300. Experiment with modifying the javajam.css file. Change the page background color, the font family, and so on. Test your pages in a browser. Isn't it amazing how a change in a single file can affect multiple files when external style sheets are used
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started