Page 1: Responsive Web Page Tutorial, HTML/CSS Only
Page 2: Page Structure using Flexbox and a Media Query
Page 3: Footer (nested flexboxes)
Page 4: Header (menu/search toggles, transition effects)
Page 5: Sticky Aside
Page 6: Make it Beautiful
Page 7: JavaScript Efficiencies, Breadcrumbs, Cats, Audio and More
Page 8: Embedded Note from Creator and Floating Hearts
Page 9: Move On To, Video Tutorial

Make It Beautiful

I know what I like when I see it. However, I don't have the artistic skills needed to create a beautiful web page. Many years ago, I purchased a responsive web page template (called ‘Pen & Paper’) by Dabaman, for use as my homepage. When I was ready to make my math lessons responsive and beautiful, I returned to Dabaman to help me replicate the ‘look-and-feel’ of my beloved ‘Pen & Paper’ design. Any beauty you find in the final responsive web page design should be credited to Dabaman! (Dabaman is currently at Envato Studios, but they're closing in late August 2022.)

CSS Units to Specify Length

Length/distance units can be absolute or relative. Absolute units, like inch (in) or centimeter (cm), indicate a fixed length. Relative units (like  em  and  rem ) are calculated relative to something else.

Don't use absolute units in responsive web page design. The interpretation of absolute units (like  1in  or  1cm ) by browsers/monitors/devices is varied and vague. Users may not be able to influence absolute units, potentially leaving them unable to make a page element larger or smaller.

For responsive web design, instead use relative units, preferably the  rem :

In the following tables, all squares have sides of either 16px, 1em, or 1rem, as indicated:

This table has the default font-size (16px).

16px

1em

1rem
All squares should have the same size.
This table has: font-size:x-large;

16px

1em

1rem
The  em  square is bigger,
since its parent got bigger.

We'll primarily use units of  rem . (Media queries will remain in terms of pixels.) The prior CSS code will be adjusted as final styling is applied.

Backgrounds/Colors/Opacity

Fonts

Search Bar Styling

The Google Search Form is styled as follows. The search box is revealed (and given a height of  4.5rem  via the  toggle  function) when the search icon is clicked.

CSS for Search Bar HTML code for the Google Search Form
(you can download the HTML code below)

CSS for Search Bar CSS Style for the Google Search Bar
(you can download the CSS external style sheet below)

more CSS for Search Bar More CSS Style for the Google Search Bar

Move Style to External Style Sheet

Create an external CSS file (for me:  treeOfMathLessonStyleResponsiveThruSix.css ) for all the CSS in the  head  section. Change the filename as desired, but be sure to use the ‘ .css ’ extension. Link to the external stylesheet by putting

<link rel="stylesheet" href="/css/treeOfMathLessonStyleResponsiveThruSix.css">

in the  <head></head> (with the correct URL). (I put it after the  title  container.)

Lots of Other Styling

Many more styles are applied, and some already-coded styles are tweaked, to get this styled page. With so many changes, it may be easiest for you to download the current states of the HTML file and style sheet:

Here are some notable changes/additions:

Go on to Page 7 of the Responsive Page Tutorial