Skip to content

Commit 653156e

Browse files
authored
Merge pull request #44 from VinayApposite/Apposite_20480C_Mod10_LM
Apposite 20480 c mod10 lm
2 parents 4ba5e42 + 607cdc9 commit 653156e

File tree

1 file changed

+39
-38
lines changed

1 file changed

+39
-38
lines changed

Instructions/20480C_MOD10_LAB_MANUAL.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#### Scenario
66

7-
Most conference attendees are expected to use a laptop to view the live version of the Contoso Conference website, but some may wish to print a hard copy of some of the information. Other attendees might use smartphones or other handheld devices to view the website. The different requirements and form factors of a printer or a handheld device compared to a laptop make it necessary for the user interface of the web application to detect device capabilities and adapt itself accordingly. For example, some website elements, such as the header, are not necessary for printing, while the smaller screens of smartphones are not ideal for viewing full-sized websites.
7+
Most conference attendees are expected to use a laptop to view the live version of the Contoso Conference website, but some may wish to print a hard copy of some of the information. Other attendees might use smartphones or other handheld devices to view the website. The different requirements and form factors of a printer or a handheld device compared to a laptop make it necessary for the user interface of the web application to detect device capabilities and adapt itself accordingly. For example, some website elements, such as the header, are not necessary for printing, while the smaller screens of smartphones are not ideal for viewing full-sized websites.
88

99
#### Objectives
1010

@@ -20,15 +20,15 @@ Estimated Time: **60 minutes**
2020

2121
#### Scenario
2222

23-
In this exercise, you will add a style sheet for formatting web pages in a style suitable for printing. You will ensure that this style sheet is used only when a page is being printed.
23+
In this exercise, you will add a style sheet for formatting web pages in a style suitable for printing. You will ensure that this style sheet is used only when a page is being printed.
2424

25-
In the style sheet, you will add rules to override the layout of the website, removing the header and footer, and reformatting the **About** page to display the information in a single wide column. To test the application, you will view the **About** page and verify that the print preview displays a correctly formatted version of the page.
25+
In the style sheet, you will add rules to override the layout of the website, remove the header and footer, and reformat the **About** page to display the information in a single wide column. To test the application, you will view the **About** page and verify that the print preview displays a correctly formatted version of the page.
2626

27-
#### Task 1: Review the existing application.
27+
#### Task 1: Review the existing application
2828

29-
1. Start Visual Studio and open the **ContosoConf.sln** solution in the **Allfiles\Mod10\Labfiles\Starter\Exercise 1** folder.
30-
2. Run the application and view the **about.htm** page.
31-
3. In Microsoft Edge, press F10 to display the menu bar
29+
1. Start Microsoft Visual Studio, and then from the **Allfiles\Mod10\Labfiles\Starter\Exercise 1** folder, open the **ContosoConf.sln** solution.
30+
2. Run the application, and then view the **about.htm** page.
31+
3. In Microsoft Edge, press F10 to display the menu bar.
3232
4. On the **File** menu, click **Print preview**. Notice that the print preview attempts to display the page header and that the text columns are too narrow.
3333

3434
![alt text](./Images/20480B_10_Print-Preview.png "The About page in Print Preview mode")
@@ -37,22 +37,22 @@ In the style sheet, you will add rules to override the layout of the website, re
3737
6. In Visual Studio, examine the about.htm page and verify that the **<nav>** element is marked with the **page-nav** class, the **<header>** element is marked with the **page-header** class, and the **<footer>** element is marked with the **page-footer** class, as follows:
3838
```html
3939
<nav class="page-nav">
40-
40+
4141
<header class="page-header">
42-
42+
4343
<footer class="page-footer">
4444
```
4545
You will use these classes to style the elements when the page is printed.
4646

47-
#### Task 2: Create a style sheet for printing web pages.
47+
#### Task 2: Create a style sheet for printing web pages
4848

49-
1. In the ContosoConf project, add a new style sheet named **print.css** to the **styles** folder.
50-
- Use the **Add New Item** wizard and use the Style Sheet template on the **Web** tab.
51-
2. In the **print.css** style sheet, delete the existing contents and add a CSS rule to hide the **nav** element that has the **page-nav** class, the **header** element that has the **page-header** class, and the **footer** element that has the **page-footer** class.
49+
1. In the ContosoConf project, in the **styles** folder, add a new style sheet named **print.css**.
50+
- Use the **Add New Item** wizard and the **Style Sheet** template on the **Web** tab.
51+
2. In the **print.css** style sheet, delete the existing content, and then add a CSS rule to hide the **nav** element that has the **page-nav** class, the **header** element that has the **page-header** class, and the **footer** element that has the **page-footer** class.
5252
- Set the **display** property of these elements to **none**.
53-
3. Add a CSS rule for the **.container** class, which overrides the CSS from **site.css**.
53+
3. Add a CSS rule for the **.container** class, which overrides the CSS from **site.css**.
5454
- When printing, container elements should have no maximum width or padding.
55-
4. The **about.css** style sheet in the **styles/pages** folder contains the following CSS rule to display the page text in columns.
55+
4. In the **styles/pages** folder, the **about.css** style sheet contains the following CSS rule to display the page text in columns.
5656
```css
5757
.about > article > section {
5858
text-align: justify;
@@ -62,75 +62,76 @@ You will use these classes to style the elements when the page is printed.
6262
column-gap: 5rem; ;
6363
}
6464
```
65-
In **print.css**, add a CSS rule that removes the columns, so that the text displays as a single block.
65+
5. In **print.css**, add a CSS rule that removes the columns, so that the text displays as a single block.
6666
- You only need to set the **column-count** property in this rule.
6767

68-
#### Task 3: Link the print style sheet to the About page.
68+
#### Task 3: Link the print style sheet to the About page
6969

70-
1. Add a link to **print.css** in the **&lt;head&gt;** section of the **About** page, where indicated by the comment &lt;!-- TODO: Add print.css &lt;link&gt; here --&gt;. Set the **media** attribute of the link so that the style sheet is used only when printing.
70+
- In the **About** page, in the **&lt;head&gt;** section, add a link to **print.css** where indicated by the comment &lt;!-- TODO: Add print.css &lt;link&gt; here --&gt;. Set the **media** attribute of the link so that the style sheet is used only when printing.
7171

72-
#### Task 4: Test the application.
72+
#### Task 4: Test the application
7373

74-
1. Run the application and view the **About** page.
74+
1. Run the application, and then view the **About** page.
7575
2. Refresh the page to ensure that the most recent version of the **About** page is loaded.
76-
3. In Microsoft Edge, open the **Print Preview** window and verify that the preview does not display the navigation, header, or footer, and that the text has no columns.
76+
3. In Microsoft Edge, open the **Print Preview** window and verify that the preview does not display the navigation, header, or footer and that the text has no columns.
7777

7878
![alt text](./Images/20480B_10_Print-Preview-Final.png "The Print Preview version of the About page")
7979

80-
4. Close the **Print Preview** window and then close Microsoft Edge.
80+
4. Close the **Print Preview** window, and then close Microsoft Edge.
8181

82-
>**Results:** After completing this exercise, you will have added a style sheet that implements a print-friendly format for web pages.
82+
>**Results**: After completing this exercise, you will have added a style sheet that implements a print-friendly format for the web pages.
8383
84-
### Exercise 2: Adapting Page Layout to Fit Different Form Factors.
84+
### Exercise 2: Adapting Page Layout to Fit Different Form Factors
8585

8686
#### Scenario
8787

8888
In this exercise, you will create a style sheet that enables the pages in the Contoso Conference website to adapt to different device form factors.
8989

90-
First, you will view the application running in a small window to simulate a small device, such as a smartphone. Then you will use CSS media queries to define rules that change the website layout to better suit small devices.
90+
First, you will view the application running in a small window to simulate a small device, such as a smartphone. Then, you will use CSS media queries to define rules that change the website layout to better suit small devices.
9191
Finally, you will run the application again and verify that the website layout adapts to large and small screen sizes.
9292

93-
#### Task 1: Simulate the web application running on a small device.
93+
#### Task 1: Simulate the web application running on a small device
9494

95-
1. In Visual Studio, open the **ContosoConf** solution in the **Allfiles\Mod10\Labfiles\Starter\Exercise 2** folder.
96-
2. Run the application and view the **index.htm** page.
95+
1. In Visual Studio, from the **Allfiles\Mod10\Labfiles\Starter\Exercise 2** folder, open the **ContosoConf** solution.
96+
2. Run the application, and then view the **index.htm** page.
9797
3. Resize Microsoft Edge to **480 × 800**, approximating the form factor of a Windows Phone 8 device.
9898

99-
>**Note:** Use the F12 Developer Tools to change the size of the device viewing the website. The **Resize** command on the **Tools** menu enables you to change the size of the browser.
99+
>**Note**: Use the F12 Developer Tools to change the size of the device viewing the website. The **Resize** command on the **Tools** menu enables you to change the size of the browser.
100100
101-
4. Notice that the website navigation bar does not fit on the screen and that the big **Register** link overlaps the header text.
101+
4. Notice that the website navigation bar does not fit on the screen and that the big **Register** link overlaps the header text.
102102

103103
![alt text](./Images/20480B_10_Home-Narrow.png "The Home page")
104104

105105
5. Close Microsoft Edge.
106106

107-
#### Task 2: Implement styles for hand-held devices and smartphones.
107+
#### Task 2: Implement styles for hand-held devices and smartphones
108108

109-
1. Open the **mobile.css** style sheet in the styles **folder**. This style sheet is referenced in the **&lt;head&gt;** element of each page in the website. This style sheet is currently empty, but you will use it to specify the styles for hand-held devices and smartphones.
109+
1. From the styles **folder**, open the **mobile.css** style sheet. This style sheet is referenced in the **&lt;head&gt;** element of each page in the website. This style sheet is currently empty, but you will use it to specify the styles for hand-held devices and smartphones.
110110
2. Add a CSS media query that targets screens that are less than or equal to 480 pixels in width.
111111
3. In the media query, add a rule for **nav.page-nav .container** that uses a flexbox to display the contents of the navigation bar, as follows:
112-
```css
112+
```
113+
css
113114
display: -ms-flexbox;
114115
-ms-flex-wrap: wrap;
115116
-ms-flex-pack: center;
116117
```
117118
4. Add another rule that hides the **:before** and **:after** pseudo elements of the **.active** navigation link.
118119
- Set the **display** property to none.
119120
5. Add another rule that sets a **.5rem** margin around each navigation link. This rule should also set a **1px** dotted border with the color **#3d3d3d** completely around the link, instead of just on the right.
120-
6. The default layout of the website header is not suitable for screens less than 720 pixels wide. Add another media query to **mobile.css** that targets screen widths up to 720 pixels.
121+
6. The default layout of the website header is not suitable for screens less than 720 pixels wide. Add another media query to **mobile.css** that targets screen widths up to 720 pixels.
121122
7. In this media query, add rules that perform the following actions:
122123
- Reduce the height of the page header (set the **height** to **auto**).
123124
- Hide the large **Register** link in the page header.
124125
- Reduce the **font-size** of the **&lt;h1&gt;** element in the page header to **3rem**.
125126
126-
#### Task 3: Test the application.
127+
#### Task 3: Test the application
127128
128-
1. Run the application and view the **Home** page.
129-
2. Use the F12 Developer Tools to resize Microsoft Edge to various sizes to test that the media queries adapt the user interface correctly.
129+
1. Run the application, and then view the **Home** page.
130+
2. To resize Microsoft Edge to various sizes to test that the media queries adapt the user interface correctly, use F12 Developer Tools.
130131
- As a minimum, try the sizes 1280x1024 and 480x800.
131132
3. Close Microsoft Edge.
132133
133-
>**Result:** After completing this exercise, you will have a website that adapts to different screen sizes.
134+
>**Result**: After completing this exercise, you will have a website that adapts to different screen sizes.
134135
135136
©2018 Microsoft Corporation. All rights reserved.
136137

0 commit comments

Comments
 (0)