O'Reilly logo

jQuery for Designers : Beginner's Guide - Second Edition by Natalie MacLees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – sizing headlines to the screen width

Perform the following steps to create headlines that resize according to the width of the browser window:

  1. We'll get started by creating a basic HTML document and associated files and folders just like we did in Chapter 1, Designer, Meet jQuery. Inside the HTML document, we're going to create a bit of text with a headline, as follows:
    <div class="content">
      <h1>What is Typography?</h1>
      <p>Typography is the art ...</p>
    </div>
  2. Inside styles.css, some basic CSS that is applied helps to set the size of the heading, the paragraph, and padding and margin around both elements. If you take a look at the sample code included with the book, you'll see the following bit of CSS that styles basic text elements: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required