Formatting layouts and navigation for mobile 1 Objectives

 After applying a general style to your webpage, you will now format the layout and navigation of the document by creating a hamburger and sliding drawer that enables users to browse across your web pages on mobile screens.  By the end of this tutorial, you will be able to:  Develop fluid page layouts and responsive navigation in CSS.  Implement document viewports and media queries, adhering to responsive design principles.  Demonstrate advanced CSS combinators for selecting HTML elements and pseudo-classes.  Create icons and motion graphic effects using the CSS3 transform and transition properties.

Figure 1 – A wireframe for the tutorial home page formatted for mobile devices.

1

2 Set up the site

1. From your computer, duplicate the tut02 folder containing the HTML5 web pages, CSS scripts, images and folders you created for tutorial 2.

2. Rename the copied folder to tut03 on the desktop or a location of your choice.

3. Open Dreamweaver.

Note: Close any opened documents in Dreamweaver before setting up a new site. This will prevent you from editing documents that are saved in previous tutorial folders!

4. From the dropdown menu select Site > New Site

5. Inside the Site Name field, type a site name of your choice (Tutorial 03 YOUR NAME).

6. Connect the Local Site Folder property to the tut03 folder you created in step 1.

7. Choose Save and then Done. The files and folders in the tut03 folder should appear in the Files panel.

8. From the Files panel, double click index.html.

2

3 Prepare the web page for responsive navigation

You will now set up the HTML elements required for a functioning hamburger and sliding menu panel.

An input element will be used to control the visibility of #menu-list.

Figure 2 – The DOM structure of the hamburger icon and sliding panel.

In index.html,

1. Create a

to nest the three
elements with .column class that you created in tutorial 2. 2. Add an id attribute to this parent
element and assign the value menu- list.

This container will be formatted to display as a panel that slides onto the page when a user taps on the hamburger icon. The three and their respective columns created in tutorial 2 will be nested within the panel.

3. Above the menu-list, create an element. Ensure that it is nested within the