From the course: Creating a Responsive Web Design: Advanced Techniques
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Adding a mobile link button - CSS Tutorial
From the course: Creating a Responsive Web Design: Advanced Techniques
Adding a mobile link button
- So now we'll add a link to our navigation for the mobile menu. First let's go back to our text editor. Let's go into our index.html file, let's find our navigation element, and before the unordered list, let's hit a return and let's add in an anchor tag. So start with a less than sign, an A tag, space, we'll add a class. We'll call this mobile_menu. Outside of that attribute, let's add a title attribute, title=, and we'll just call this menu. Then a space, we'll add an href, we'll just link this to a pound sign. Then we'll end the tag, and then end the element. So now we simply just have an anchor link outside of the unordered list. This is the menu icon that we're going to show on small screens, so later on, when somebody clicks on this, we'll use JavaScript to extend the unordered list down here. So with the HTML in place, let's go back to our exercise files. Let's go into the CH_01 folder. So let's come in here and option drag or copy and paste this SVG graphic into our project…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
About this lesson46s
-
(Locked)
Relocating the nav element4m 33s
-
(Locked)
Adding a mobile link button4m 43s
-
(Locked)
Removing the header height restrictions2m 2s
-
Restyling the mobile menu2m 22s
-
(Locked)
Adjusting the logo to overlap the menu3m 58s
-
(Locked)
Adding JavaScript and jQuery to your project5m 32s
-
(Locked)
Attaching a click event to the mobile menu button4m 4s
-
(Locked)
Animating the height of the navigation4m 51s
-
(Locked)
Removing the style attribute from the nav element5m 21s
-
(Locked)
Where to go from here25s
-
(Locked)
-
-