Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Designing menus

From: WordPress: Building Responsive Themes

Video: Designing menus

Menus have always been a hot button issue in web design and web development circles, and the heat has just increased for the introduction of responsive design. The challenge has always been how to create menus that look good, are accessible, and are functional all at the same time. You can usually only get two of those three. When it comes to responsive design, there's the added complication that we now have to create menus that work both for regular, old-fashioned mouse-based point- and-click behaviors and for new touch behaviors.

Designing menus

Menus have always been a hot button issue in web design and web development circles, and the heat has just increased for the introduction of responsive design. The challenge has always been how to create menus that look good, are accessible, and are functional all at the same time. You can usually only get two of those three. When it comes to responsive design, there's the added complication that we now have to create menus that work both for regular, old-fashioned mouse-based point- and-click behaviors and for new touch behaviors.

This means making menus that have items that are easy to click on with clumsy thumbs and also dealing with the issue that in touch-based devices there is no such thing as a hover state, so regular dropdown menus don't work exactly as they're supposed to. In the Anaximander theme I've tried to address both the concerns of accessibility and also the concerns of mobile devices. What I've done is create menu styles that change depending on the size of the screen. So by default, on a large screen you get the standard menu, which has fairly small buttons that you have to touch exactly to get them to activate.

But if you reduce the size of the screen down to a size that probably is on a mobile device, you get much larger buttons that are much easier to click on with your thumbs and have much larger active areas. At the same time, they are more distinct from the remainder of the design to make it more clear that these are menu items. In addition, as I alluded earlier, I made this menu accessible, even with a keyboard. So if you tab through this page, you'll see that as you get to the menu, you can actually go through each of the menu items by navigating with your keyboard.

This is an important extra feature, because it means that the markup is really clear, both for search engines and for people who access this web site using some other device than a regular screen. This was achieved by adding a JavaScript library called Superfish. The Superfish Library allows you to create accessible menus that are easy to navigate with multiple different types of devices, including with a keyboard. Superfish was created by Joel Birch, and if you're ever going to create a theme that has a dropdown menu in it, I highly recommend including this JavaScript library so that you get properly accessible menus in your site.

That's said, I'm going to give you my two cents on the matter. In my opinion, dropdown menus are a bad idea and should be avoided at all costs. There are many reasons for this, but the two main ones is A, dropdown menus are quite difficult to deal with on cell phones, primarily because the different types of cell phone browsers handle dropdown menus differently. So in many cases, even if you build the menu specifically to handle cell phones, it still will not work properly, and the result is you'll often see these custom-built menus to only appear on phones that add tons of extra code to your site and don't really do anything except make a different user experience for the phone users.

That's not ideal. The other reason is, if you put up a dropdown menu, you are effectively hiding content on the page. What happens is you're making an assumption that everyone who visits your sites automatically will go and hover over all of your menu items just to see if there's something underneath. And yes, you could add an arrow next to the menu if you wanted to to indicate there is something underneath there, but you're still making a quite elaborate assumption about the person visiting your site. If you're putting links in a dropdown menu, you're basically hiding it from the person who visits.

And I know what you are going to ask: So if you don't use a dropdown menu, what am I going to do with all these extra menu items? The answer is instead of making a dropdown menu, like the one you see here, go to that page that the first menu item links to and put the list of other items in the page. This is far more obvious, and it's also far more effective, because in a scenario where a person lands on this page first and doesn't use the menu, that person would have no idea that there were other pages related to this page, if those pages were only linked on the menu.

Why on earth would they go and click on the menu when they're already on the page. So if instead you put the links inside the page or if you make a landing page for all these other pages that you are linking to, it becomes far easier for someone who visits to actually get to the content they are looking for. Unfortunately, I don't have a cure-all for the menu disease. What I can say though, is that by trying to reduce a number of menu items you use and focusing on information architecture to create navigation that is simple and intuitive, you should be able to use one of, or a combination of, the methods I've shown you to create responsive menus that work for all devices.

Show transcript

This video is part of

Image for WordPress: Building Responsive Themes
WordPress: Building Responsive Themes

39 video lessons · 16900 viewers

Morten Rand-Hendriksen
Author

 
Expand all | Collapse all
  1. 4m 5s
    1. Welcome
      1m 4s
    2. Using the exercise files
      1m 27s
    3. What you should know before watching this course
      1m 34s
  2. 8m 36s
    1. What is responsive design?
      4m 16s
    2. The different faces of WordPress on mobile
      1m 55s
    3. Exploring the finished Anaximander theme
      2m 25s
  3. 9m 38s
    1. Getting and installing the Anaximander theme
      1m 53s
    2. Configuring basic theme options
      7m 45s
  4. 23m 51s
    1. Deciding what screen sizes to design for
      4m 11s
    2. Thinking responsively: Designing for many different screen sizes
      6m 23s
    3. Visualizing content realignment for better markup
      4m 35s
    4. Designing menus
      4m 52s
    5. Adding responsive images and videos
      3m 50s
  5. 26m 8s
    1. What are media queries and how do they work?
      4m 18s
    2. Exploring CSS3, progressive enhancement, and graceful degradation
      3m 27s
    3. Understanding best practices for media queries
      3m 57s
    4. Creating a responsive frame
      5m 12s
    5. Customizing media queries with the Chrome Developer Tools
      5m 28s
    6. Taking device width into account
      3m 46s
  6. 11m 1s
    1. Resizing the site title and the description
      8m 22s
    2. Adding media queries to the header
      2m 39s
  7. 11m 22s
    1. Making the menu responsive
      3m 35s
    2. Creating a different menu design for small screens
      7m 47s
  8. 19m 22s
    1. Making a responsive single-post layout
      6m 11s
    2. Making images responsive
      4m 37s
    3. Making videos responsive by including FitVids
      8m 34s
  9. 7m 45s
    1. Making the sidebar responsive
      5m 10s
    2. Hiding sidebars on mobile
      2m 35s
  10. 7m 28s
    1. Dealing with footer widgets
      5m 11s
    2. Adding navigation links that return to the top of the page
      2m 17s
  11. 12m 54s
    1. Using FlexSlider to create a responsive slider
      6m 2s
    2. Creating a loop to show sticky posts in a featured slider
      6m 52s
  12. 24m 37s
    1. What is jQuery Masonry?
      3m 41s
    2. Installing jQuery Masonry
      4m 45s
    3. Configuring the index page with Masonry
      7m 0s
    4. Using CSS to finalize the Masonry layout
      6m 17s
    5. Adding media queries to the Masonry index
      2m 54s
  13. 9m 11s
    1. Exploring hidden features of the Anaximander theme
      5m 51s
    2. Where to go from here
      3m 20s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed WordPress: Building Responsive Themes.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.