Book Image

Mobile First Design with HTML5 and CSS3

By : Jason Gonzales
Book Image

Mobile First Design with HTML5 and CSS3

By: Jason Gonzales

Overview of this book

<p>The mobile first design philosophy aims to develop websites that will be lean and fast on small screens without sacrificing a tablet or desktop experience. Using HTML5, CSS3, and simple, standardized modern web tools you can make one site to rule them all.</p> <p>Mobile First Design with HTML5 and CSS3 will teach you the tools you need to make a modern, standards-based web page that displays beautifully on nearly any web browser—essential knowledge for anyone who makes websites!</p> <p>In this book, you will learn how to set up a project from scratch and quickly get up and running with a full portfolio website that will form the base for making almost any kind of web page. Learn to develop web pages that fit the web conventions we all have to conform to. You will learn how to make responsive image slideshows; image galleries with detail pages; and bold, eye-catching banners and forms. Best of all, you will learn how to make these things fast without compromising quality.</p> <p>This book will walk you through the process step by step with all the code required, as well as the thinking that goes behind planning a mobile first responsive website.</p>
Table of Contents (14 chapters)

Preface

Building websites that display well on everything from web-enabled smartphones to tablets, to laptops and desktops, is a daunting challenge. The myriad permutations of screen sizes and browser types might be a reason enough to not even try. But if your business counts on getting web content to people on these devices and you need your business to look tech-savvy, you must put your best foot forward. In this book, you will see that with the help of some easy-to-understand principles and an open source framework you can build a mobile first responsive website fast.

What this book covers

Chapter 1, Mobile First – How and Why? gives a quick introduction to mobile first strategy.

Chapter 2, Building the Home Page, dives right in and builds the face of your site and the foundation for the rest of the site.

Chapter 3, Building the Gallery Page, builds a responsive page to show off your work.

Chapter 4, Building the Contact Form, lets prospective clients contact you from a device of any screen size.

Chapter 5, Building the About Me Page, makes an attractive, responsive page to help people get to know you.

Appendix A, Anatomy of HTML5 Boilerplate, gives an overview of HTML5 Boilerplate, including meta tags and scripts.

Appendix B, Using CSS Preprocessors, helps you learn the basics of CSS Preprocessors and how to use them.

What you need for this book

You should have Windows or Linux. The instructions in this book favor Mac OS X and Linux, but for the most part we will only be writing plain text and using very few command-line tools. In places where we do, I have done my best to offer up resources for how to get similar results on a Windows computer. You should also have a text editor. It will be very helpful if you know how to launch and use a command-line tool.

Who this book is for

This book is for you if you are curious or excited about responsive design and how it can help in providing usable web interfaces on everything from mobile phones to desktop computers.

In terms of technical skills, this book is targeted at both beginners to intermediate developers as well as designers. In other words, you should already know how to build an HTML page and style it with CSS by using a text editor of some kind. You don't have to be an expert at any of these things though. You also don't need to be a command-line expert, but hopefully you are open to using command-line tools. They are quite helpful.

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, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "When the browser replies yes to both screen and min-width 768px, the conditions are met for applying the styles within that media query."

A block of code is set as follows:

<!DOCTYPE html>
  <head>
    <link rel="stylesheet" href="css/main.css">
  </head>
  <body>
    <button class="big-button">Click Me!</button>
  </body>
</html>

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: "I went ahead and created links to pages that don't exist yet, so if you click on them you will get a 404 file not found message."

Note

Warnings or important notes appear in a box like this.

Tip

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 via 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.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

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/submit-errata, 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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

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.