What is in this tutorial?
- Mobile-first design principles
- Learn how ‘vh’ viewport height works
- Learn how to vertically and horizontally center elements on page
- Writing jQuery script for collapsible navigation menu
- Applying parallax smooth scrolling jQuery script for single page navigation
- Applying Lightbox 2 jQuery effects to gallery
Please watch all videos below to complete the tutorial.
Best Results Watching Videos
Depending on the speed of your connection and size of your screen, you might want to increase or decrease the streaming resolution of the videos below. To do so, start the movie, and a gear icon will appear, which you can select and choose a different streaming quality. These were recorded at a max of 720p, so if you are on a fast connection, this might be your best choice for clarity on larger screens.
Exercise 5 introduction and overview.
Getting started: setting up HTML, basic CSS reset, and some base CSS text rules.
Setting the page header to be full-viewport introduction.
A SPECIAL NOTE:
This demo shows the use of the “vh” or “viewport height” unit of measurement, which is still in development on some modern browsers and many mobile browsers. After completing this video, you can avoid the “page-header” section collapsing in older versions of Safari by adding the following to the “section#page-header header” rule:
Setting up the HTML/CSS foundation for mobile-first main navigation menu.
Writing jQuery script to make main navigation menu functional.
1) Adding final styles to nav menu
2) Adding jQuery ‘removeClass’ to nav links for intuitive functionality
3) Addressing progressive enhancement with ‘noscript’ feature
4) Testing page with JS disabled
Adding the page content sections and their contents. Begins to address styling of the sections.
1) Dealing with content headers diving up under the fixed ‘nav’ bar.
2) Adding more advanced content in ‘Skills’ section and styling for mobile-first approach.
1) Adding svg icons to social media section of ‘Contact’ section.
2) Styling ‘Contact’ and ‘Portfolio’ gallery lists.
1) Adding media queries to deal with larger screen sizes.
2) Adding parallax scrolling to the page with jQuery script. NOTE: since the video, an additional article was added to the css-tricks website. To follow this tutorial, use the code base in this link for the smooth scrolling effect:
UPDATED 4/25/17 – Implementing ‘Lightbox 2’ jQuery script to portfolio gallery (part 1).
1) Complete the addition of ‘LightBox 2’ implementation for gallery.
2) Discuss other ways of adding background variety to specific sections of the page.