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

Embedded Note from Creator and Floating Hearts

Embed a Note From the Website Creator

There are things I want users to see, and these vary over time. Also, I want my pages to be friendly and supportive. So, I embed a ‘Note from Dr. Burns (the website creator)’ in each page. The note is easily updated (in the auxiliary Javascript file) and automatically loaded into all my lessons.

snapshot of embedded note from web creator

Put this code in the desired location in the HTML file:

HTML for embedded note from web creator

Put this function (with desired content) in the auxiliary JavaScript file:

JavaScript function for embedded note from web creator (truncated) JavaScript function for ‘Note from Web Creator’

Hard to see? No worries! The JavaScript auxiliary file is available for download at the bottom of this page.

Put this CSS (slightly truncated here) in the external stylesheet:

CSS style for embedded note from web creator
The external stylesheet is available for download at the bottom of this page.

Floating Hearts

On every page, I want to draw attention to my ‘original cat book’, One Mathematical Cat, Please! Ideas for Anyone Who Wants to Understand Mathematics . This little book is the heart of all the math I have on the web. To do this, floating hearts appear whenever a user hovers over the mathematical cat image, and the image is a link to my book. Here's a snapshot of the floating hearts:

floating hearts from cat image

The only change in the HTML is to load a revised function:

revised HTML for mathematical cat with floating hearts

Here's the revised function for the auxiliary JavaScript file (which replaces the old  loadMathematicalCat()  function):

JavaScript function for mathematical cat with floating hearts

Two new functions are required, to start and stop the floating hearts animation:

JavaScript function for mathematical cat with floating hearts

There's lots of new CSS, including the magic for the animation. Look inside the section labeled  Randomly-loaded Mathematical Cat with Floating Hearts  in the external CSS file, which can be downloaded at the bottom of this page.

UPDATE: The floating hearts didn't play well with touchscreens, since there's no reliable ‘hover’ action there. So, I tweaked the behavior to play a single animation on page load, and also added a link beneath the cat image that says ‘click for cat book’. (You'll see this updated behavior in the version from lesson 9.)

The Page So Far...

Go on to Page 9 of the Responsive Page Tutorial