Bootstrap is a front-end framework for building responsive websites. Whether it is application frameworks, blogs, or other CMS applications, Bootstrap can be a good fit as it can be as vanilla as you like. It’s combination of HTML, CSS, and Javascript make it easy to build robust sites, without adding a lot of code. With a default grid system, layouts come together with ease, and the styling of buttons, navs, and tables make basic markup look great from the get go. A dozen or so Javascript plugins catapult you into adding interactive elements to your site.
This books is mostly for people that have a good handle on HTML/CSS and Javascript, and are curious to get started with building responsive sites, adding the Bootstrap Javascript plugins, or building sites faster by using this popular open-source framework.
This book is not for people that get all they need out of the Bootstrap online documentation. Like a lot of people, the online docs are where I got started, building my first site with Bootstrap 1.3, and then upgrading it to Bootstrap 1.4. After that, a big project was built with Bootstrap 2.0 and on. If you are comfortable writing semantic HTML, then jumping into Bootstrap should be easy for you to get started with.
With some background in writing HTML/CSS, and Javascript, this book will help you get off the ground writing some flexible code for responsive websites. In practical terms, the concepts and code syntax should come easily as it follows the patterns for writing semantic HTML and CSS anyways.
This book tries to built a site with Bootstrap, starting at the foundation of the project, the file structure, moving up through the grid system, and layout types into HTML elements and styling like forms, tables, and buttons. Once the walls are up, we move into the aesthetic elements like navbars, breadcrumbs, and media objects. After that, into the Javascript elements that provide the interaction for a site like dropdowns, the carousel, and modals.
I’m not an Bootstrap expert hoping to create more Bootstrap experts to get a lot of work done.
I’m a developer and writer who encountered Bootstrap through a post on Dave Winer’s blog, and I thought that it would be cool to apply it to a new site that I was working on and since felt compelled to share some of that. I’m hoping that the path I followed will work for other people, probably with variations, and that a book written from a beginner’s perspective (and vetted by experts) would help more people find and enjoy Bootstrap.
This book may not be the best way for you to learn Bootstrap. It all depends on what you want to learn and why.
If your primary interest is to get started building Bootstrap websites, the online documentation at http://twitter.github.com/bootstrap/ may likely suit you perfectly. The authors, Jacob Thornton and Mark Otto have been meticulous in providing examples of the codebase, and HTML code samples, and more to kick start your project. It is top notch, and where I have gathered the structure for this book.
If you want to contribute to the work of the open source project, you can submit pull requests, or use the issue tracker on the Github project, http://github.com/twitter/bootstrap/, for updates, downloads, documentation, and more.
If you are simply looking for Javscript plugins, or a CSS reset, Bootstrap maybe overkill. If you aren’t in love with some of the default interface elements that can be overwritten easily, or just strip out the associated tags. If you are looking for an easy way to build fast, responsive websites, Bootstrap is a great way to get going. I use it on all of my projects, and I’m really happy with it.
The following typographical conventions are used in this book:
- Italic
-
Indicates new terms, URLs, email addresses, filenames, and file extensions.
- Constant width
-
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, statements, and keywords.
Constant width bold
-
Shows commands or other text that should be typed literally by the user.
- Constant width italic
-
Shows text that should be replaced with user-supplied values or by values determined by context.
Note
|
This icon signifies a tip, suggestion, or general note. |
Warning
|
This icon indicates a warning or caution. |
The examples in this book are meant to teach basic concepts in small bites. While you may certainly borrow code and reuse it as you see fit, you won’t be able to take the code of this book and build a stupendous application instantly (unless perhaps you have an unusual fondness for bacon and cats). You should, however, be able to figure out the steps you need to take to build a great website.
You can download the code from the Examples link on the book’s page at hhttp://shop.oreilly.com/product/0636920027867.do.
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you are reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "Bootstrap, Responsive Web Development, by Jake Spurlock (O’Reilly). Copyright 2013 Jake Spurlock, 0636920027867."
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected].
While I hope that you will enjoy reading this book and learn from it, I also hope that you can contribute to helping other readers learn Bootstrap here. You can help your fellow readers in a number of ways:
-
If you find specific technical problems, bad explanations, or things that can be improved, please report them through the errata system at http://oreilly.com/catalog/errata.csp?isbn=0636920027867.
-
If you like (or don’t like) the book, please leave reviews. The most visible places to do so are on Amazon.com (or its international sites) and at the O’Reilly page for the book at http://shop.oreilly.com/product/0636920027867.do. Detailed explanations of what worked and what didn’t work for you (and the broader target audience of programmers new to Erlang) are helpful to other readers and to me.
-
If you find you have much more you want to say about Bootstrap, please consider sharing it, whether on the Web, in a book of your own, in training classes, or in whatever form you find easiest.
I’ll update the book for errata, and try to address issues raised in reviews. Even once the book is 'complete', I may still add some extra pieces to it. If you purchased it as an ebook, you’ll receive these updates for free at least up to the point where it’s time for a whole new edition. I don’t expect that new edition declaration to come quickly, however, unless the Bootstrap world changes substantially.
Hopefully this book will engage you enough to make you consider sharing.
I’ll let you determine what "good" means, but think about it. Please try to use Bootstrap’s power for projects that make the world a better place, or at least not a worse place.
Many thanks to Dave Winer for interesting me in Bootstrap in the first place, and to Simon St. Laurent for the opportunity to write this. Detailed feedback from my friends Roseanne Fallin, and Tony Quartorolo has made it possible, I hope, for this book to get readers started on the right track. Thanks to Melissa Morgan for letting my take a few risks and develop the way that I like at MAKE too.
In particular, thanks to my wife Melissa for putting up with me, and encouraging me to finish. To my son Rush for understanding that I needed to "Work", and to my daughter Hailey for the warm smiles and huge hugs in the morning.