Time for action – scrollable HTML

Follow these steps to set up a simple HTML page with a scrollable area:

  1. We'll start off with setting up a basic HTML page and associated files and folders, just like we did in Chapter 1, Designer, Meet jQuery. We need to have an area of content that's large enough to scroll, so we'll add several paragraphs of text to the body of the HTML document:
    <!DOCTYPE html> <html> <head> <title>Custom Scrollbars</title> <link rel="stylesheet" href="styles/styles.css"/> </head> <body> <h2>We don't want this box of content to get too long, so we'll make it scroll:</h2> <p>Lorem ipsum dolor sit amet... Include several paragraphs of lorem ipsum here ...mollis arcu tincidunt.</p> <script src="scripts/jquery.js"></script> <script ...

Get jQuery for Designers Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.