Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Responsive Web Design with HTML5 and CSS3

You're reading from   Responsive Web Design with HTML5 and CSS3 Web pages that respond immediately to different screen sizes and devices is one of today's essentials. Packed with screenshots and examples, this book will teach you the professional approach using just HTML5 and CSS3.

Arrow left icon
Product type Paperback
Published in Apr 2012
Publisher Packt
ISBN-13 9781849693189
Length 324 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ben Frain Ben Frain
Author Profile Icon Ben Frain
Ben Frain
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Responsive Web Design with HTML5 and CSS3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with HTML5, CSS3, and Responsive Web Design FREE CHAPTER 2. Media Queries: Supporting Differing Viewports 3. Embracing Fluid Layouts 4. HTML5 for Responsive Designs 5. CSS3: Selectors, Typography, and Color Modes 6. Stunning Aesthetics with CSS3 7. CSS3 Transitions, Transformations, and Animations 8. Conquer Forms with HTML5 and CSS3 9. Solving Cross-browser Responsive Challenges Index

Preface

If you think you need to create a "mobile" version of your website—think again! A responsive web design provides one design that looks great on smart phone, desktop, and everything in-between. It will effortlessly respond to the size of the user's screen, providing the best experience possible for both today's and tomorrow's devices.

This book provides a complete "how-to" of taking an existing fixed width design and making it responsive. Furthermore, it extends responsive design methodology by applying the latest and most useful techniques provided by HTML5 and CSS3, making the design leaner and more maintainable than ever before. It also explains common best-practice methods of writing and delivering code, images, and files.

If you can understand HTML and CSS, you can build a responsive web design.

What this book covers

Chapter 1, Getting Started with HTML5, CSS3, and Responsive Web Design, defines what responsive web design is, provides examples of responsive designs, and highlights the benefits and economies of using HTML5 and CSS3.

Chapter 2, Media Queries: Supporting Differing Viewports, explains what media queries are, how to write them, and how they can be applied to any design to adapt the CSS styles for a device's capabilities.

Chapter 3, Embracing Fluid Layouts, explains the benefits of a fluid layout and shows how to easily convert a current fixed-width design to a fluid layout or use a CSS framework to rapidly prototype a responsive design.

Chapter 4, HTML5 for Responsive Designs, explores the many benefits of coding with HTML5 (leaner code, semantic elements, offline caching, and WAI-ARIA for assistive technologies).

Chapter 5, CSS3: Selectors, Typography, and Color Modes, demonstrates the power of CSS3 selectors, allowing you to target and transform anything with ease. We also use CSS3 @font-face rules to create beautiful web typography and explain new CSS3 color modes such as RGB(A) and HSL(A).

Chapter 6, Stunning Aesthetics with CSS3, shows how to create text shadows, box shadows, and gradients with pure CSS3. We also cover how to add multiple background images and create icons with a font.

Chapter 7, CSS3 Transitions, Transformations, and Animations, covers how to create, animate, and transform on-screen elements with nothing more than CSS3.

Chapter 8, Conquer Forms with HTML5 and CSS3, illustrates how to implement cross-browser form techniques that work on everything from the latest smart phones to desktop browsers.

Chapter 9, Solving Cross-browser Responsive Challenges, explains how to make old Internet Explorer versions responsive, adapt a set of links to a menu on mobile devices, serve different content for high-resolution displays, and conditionally load assets with Modernizr.

What you need for this book

You'll need a good familiarity with HTML and CSS. A very basic understanding of JavaScript may also help. A good taste in films will also be beneficial.

Who this book is for

Are you writing two websites—one for mobile and one for larger displays? Or perhaps you've heard of "responsive design" but are unsure how to bring HTML5, CSS3, and responsive design together. If so, this book provides everything you need to take your web pages to the next level—before all your competitors do!

This book is aimed at web designers and web developers who currently build fixed-width websites with HTML 4.01 and CSS 2.1. This book explains how to build responsive websites with HTML5 and CSS3 that adapt to any screen size.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "HTML5 also accepts a far slacker syntax to be considered "valid". For example, <sCRipt SrC=js/jquery-1.6.2.js></script> is just as valid as the prior example."

A block of code is set as follows:

<div class="header">
  <div class="navigation">
    <ul class="nav-list">
      <li><a href="#" title="Home">Home</a></li>
      <li><a href="#" title="About">About</a></li>
    </ul>
  </div> <!—end of navigation -->
</div> <!—end of header -->

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

#wrapper {
  margin-right: auto;
  margin-left: auto;
  width: 96%; /* Holding outermost DIV */
}

#header {
  margin-right: 10px;
  margin-left: 10px;
  width: 97.9166667%; /* 940 ÷ 960 */
}

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "For example, the navigation menu doesn't alternate between red and black, the main THESE SHOULD HAVE WON button in the content area and the full info buttons from the sidebar are missing and the fonts are all a far cry from the ones shown in the graphic file".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image