Skip to main content

Day 6 - Horizontal Navigation with Flexbox

Housekeeping

  • Assignment 3: 404 Page Not Found
  • Achievements Round 2 will be announced tomorrow;
  • Marks released after lunch:
    • CPNT-201 A2
    • Achievements Round 1
  • Marks (and spoilers) released Thursday due to deadline extensions:
    • CPNT-260 A1
    • CPNT-260 A2

1. Review: SVGs

Code Demo

Let’s build some custom dice!

Example: King of Tokyo

Tony uses SVGs and Flexbox to display the dice roller in this (work-in-progress) board game:


2. Slides: Accessible Horizontal Navigation

Flex navigation slides

Materials

Activity: Create a horizontal nav

Refactor the following navigation with Flexbox to make it horizontal:

Spoilers:


Lab Time

Activity: Make your own horizontal nav menu

Try to duplicate a horizontal navigation menu and banner using the above sample code.

Search for an example of a horizontal navigation menu online that you think you can duplicate.

  • Which of the “horizontal menu” examples above best fit your selected menu? Are other Flexbox properties required to achieve the desired effect?
  • How much padding needs to be added to the a element?
  • What colours are used? How do you find this information? What elements are the colours applied to?
  • What other design elements are needed? What CSS properties are needed to create clickable links?

Activity: Play some learning games!

Learning games for Flexbox:


Prep

Reading list

Watch list

Search list

  • “flexbox patterns”

Digging deeper (optional)