0% found this document useful (0 votes)
51 views7 pages

Bootstrap Guide and Resources PDF

This document provides an overview of Bootstrap including scaffolding, CSS components, layout components and responsive design. It describes the basic grid system, typography, forms, buttons, images, icons and other common elements in Bootstrap.

Uploaded by

Jetro Pi-on Pepe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views7 pages

Bootstrap Guide and Resources PDF

This document provides an overview of Bootstrap including scaffolding, CSS components, layout components and responsive design. It describes the basic grid system, typography, forms, buttons, images, icons and other common elements in Bootstrap.

Uploaded by

Jetro Pi-on Pepe
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

[Link]-ebooks.

info
Table of Contents

Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

1. Bootstrap Scaffolding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is Bootstrap? 1
Bootstrap File Structure 2
Basic HTML Template 2
Global Styles 3
Default Grid System 3
Basic Grid HTML 4
Offsetting Columns 4
Nesting Columns 5
Fluid Grid System 5
Container Layouts 6
Responsive Design 6
What Is Responsive Design? 7

2. Bootstrap CSS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Typography 9
Headings 9
Lead Body Copy 10
Emphasis 11
Bold 11
Italics 11
Emphasis Classes 11
Lists 15
Code 17
Tables 18
Optional Table Classes 19

iii

[Link]
Table Row Classes 20
Forms 21
Optional Form Layouts 22
Supported Form Controls 24
Extended Form Controls 27
Form Control Sizing 29
Form Control States 32
Buttons 34
Button Sizes 35
Disabled Button Styling 36
Images 37
Icons 38
GLYPHICONS Attribution 39
Usage 39

3. Bootstrap Layout Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41


Dropdown Menus 41
Options 42
Button Groups 42
Button Groups as Radio Buttons and Checkboxes 44
Buttons with Dropdowns 44
Split Button Dropdowns 45
Dropup Menus 46
Navigation Elements 46
Tabular Navigation 47
Basic Pills Navigation 47
Stackable Navigation 48
Dropdowns 49
Navigation Lists 50
Tabbable Navigation 51
Navbar 54
Navbar Links 54
Forms 55
Navbar Menu Variations 55
Breadcrumbs 58
Pagination 59
Pager 61
Labels 62
Badges 62
Typographic Elements 63
Hero Unit 63
Page Header 63

iv | Table of Contents

[Link]
Thumbnails 64
Alerts 65
Progress Bars 66
Media Object 68
Miscellaneous 70
Wells 71
Helper Classes 72

4. Bootstrap JavaScript Plugins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73


Overview 73
Programmatic API 74
Transitions 74
Modal 74
Usage 76
Options 76
Methods 77
Events 77
Dropdown 78
Usage 78
Dropdown Usage via JavaScript 79
Method 79
Scrollspy 79
Usage 79
.scrollspy('refresh') Method 80
Options 80
Event 81
Toggleable Tabs 81
Usage 82
Events 82
Tooltips 82
Usage 83
Options 83
Methods 83
Popover 84
Usage 85
Options 85
Methods 86
Alerts 86
Usage 87
Close Method 87
Events 87
Buttons 87

Table of Contents | v

[Link]
Loading State 87
Single Toggle 88
Checkbox Buttons 88
Radio Buttons 89
Usage 89
Methods 89
Collapse 90
Usage 91
Options 91
Methods 92
Events 92
Carousel 93
Usage 94
Options 94
Methods 94
Events 95
Typeahead 95
Usage 95
Options 96
Affix 96
Usage 97
Option 97

5. Using Bootstrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
GitHub Project 99
Customizing Bootstrap 99
Using LESS 100
Text Snippets 102
Photoshop Templates 103
Themes 104
Built with Bootstrap 104
Conclusion 104

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

vi | Table of Contents

[Link]
Foreword

I was a software developer before Mac existed, so I remember how the tech industry
reacted to it. For the most part, the community reacted with a fair amount of skepticism.
The interesting thing is that the negative things people say about Bootstrap today sound
exactly like the negative things people said about the Mac in 1984. And in both cases,
the things that people didn’t like were what made them important.
Apple realized that there is a set of things that all software has to do, so why shouldn’t
they all do them the same way? If they did, software would be easier to develop and
debug, but more important—it would be easier to use. If there was only one way to
create menus, then once a user learned how to use the menus of one app, he would
already know how to use the menus of all others. The same is true with scrollbars,
windows, the keyboard, the mouse, printing, and sound.
The reason programmers didn’t like it, (and I was one of them) was that they took what
we did and commoditized it. Further, there were limits to the one-size-fits-all approach.
There were some apps that didn’t take to the UI standards very well. What to do about
them? Well, you adapted, that’s what you did.
This is a well-known technical process called factoring. If you see yourself doing some‐
thing over and over, do it one more time really well, work on the API so it’s easy and
flexible, and that’s it. You never do it again. It’s how you build ever-taller buildings out
of software. What was the leading edge five years ago is baked into the operating system
today. Progress. It’s a wonderful thing!
The same patterns are observable in the Web. In fact, it’s kind of sad how much of a
repeat it is, how backward today’s development environment is compared to the one
envisioned by the Mac. But at least Bootstrap is out there doing the factoring. If I want
to put up a menu, I can just use the code that creates menus. Sure, my menu looks like
all the others, but that’s a good thing for users. There is no need to learn a second or
third way to use a menu.

vii

[Link]
That this is needed, desperately needed, is indicated by the incredible uptake of Boot‐
strap. I use it in all the server software I’m working on. And it shows through in the
templating language I’m developing, so everyone who uses it will find it’s “just there”
and works any time you want to do a Bootstrap technique. Nothing to do; no libraries
to include. It’s as if it were part of the hardware. It’s the same approach that Apple took
with the Mac OS in 1984.
Like all important technologies, Bootstrap is “good enough” but not too good. In other
words, the designers, Mark Otto and Jacob Thornton, could have factored more than
they did. However, while they could have created something more compact and perhaps
more elegant, it wouldn’t have been nearly as approachable. The great thing about
Bootstrap for a guy like me, who has been busy building software behind websites, is
that it solves a whole bunch of problems that we all have when putting a user interface
on those sites.
However, I think that will turn out to be just the beginning. I see the opportunity for
Bootstrap to become an integral part of the Web—a toolkit that you can count on being
present in every environment you work in. Further, someday, perhaps soon, designers
will be able to plug in skins for Bootstrap that transform the appearance of a site without
any modification to the code or to its styles or scripts. I don’t see any limits to what can
be done with Bootstrap. Rather than being a replacement for designers, it creates op‐
portunities for designers to have more power and reach.
These days, part of the maturing process of any new technology is the release of its
O’Reilly book. Now Bootstrap has one. The author, Jake Spurlock, a web developer, has
been building sites with Bootstrap, has spoken at conferences about it, and he credits
me for getting him started with a series of enthusiastic blog posts I wrote as I was
discovering its power and elegance. Now, I can happily turn you over to Jake’s able hands.
He will show you how the Bootstrap magic works, so you too can help move the web
development world forward.
—Dave Winer
editor, Scripting News, January 2013, New York

viii | Foreword

[Link]

Common questions

Powered by AI

While Bootstrap offers robust user interface components, its one-size-fits-all approach can limit customization opportunities for complex web applications requiring unique designs or functionalities. The pre-defined CSS and JavaScript components might not integrate seamlessly into applications needing highly specialized behavior or appearance, necessitating extensive overriding of default styles. Furthermore, heavy reliance on external libraries may introduce size and performance issues, impacting loading times and user experience. As a result, developers may encounter trade-offs between Bootstrap's convenience and the bespoke needs of complex applications .

Bootstrap's modular and standardized approach mirrors the Mac OS's philosophy from 1984, where uniform methods were introduced for task execution, simplifying development and user interaction. Similar to how Mac OS standardized UI elements like menus and scrollbars for consistency, Bootstrap standardizes UI components like navigation, buttons, and modals, thereby commoditizing web design elements and improving usability and efficiency. This approach eliminates the need for repetitive coding for common UI features, encouraging uniformity which factored into reducing complexity and enhancing developer productivity .

Bootstrap democratizes web design by providing a comprehensive set of tools and pre-designed components that lower the barrier to entry for non-professional designers. Its ready-to-use elements, including grid systems, typography, buttons, and forms, allow users without advanced design skills to develop professional-looking websites. Furthermore, Bootstrap's customization capabilities empower users to tailor designs to their needs, fostering creativity while maintaining accessibility and standardization. This democratization supports a wider adoption among varied user groups, effectively bridging skill gaps and enabling more people to participate in web development .

The adoption of Bootstrap has transformed the workflow of web developers by streamlining the design process and reducing development time. Its extensive library of pre-designed components allows developers to quickly prototype and deploy web pages, shifting focus from simple UI construction to more complex feature development. The consistent framework helps in reducing cross-browser inconsistencies, facilitates rapid iteration, and ensures responsive designs, leading to more efficient project lifecycles and the ability to focus more on customizing and enhancing user experiences .

Bootstrap facilitates scalable and maintainable codebases by enforcing a structured and standardized framework that encourages clean, consistent, and modular code. The grid system, reusable components, and segmented styling allow developers to manage complex layouts and styles efficiently. This modularity supports scalability as new features or components can be seamlessly integrated or modified without disrupting existing code. Furthermore, consistent naming conventions and pre-built classes reduce redundancy, making the code base more manageable and less error-prone over time .

Bootstrap's customizable themes offer significant flexibility and enhance a web page's aesthetics by allowing developers to apply consistent styles across components while still personalizing the look and feel. This is achieved through the framework's support for theming with variables and support for CSS pre-processors like LESS. Themes enable a multilayered approach to customization where designers can modify colors, typography, and layout styles globally while ensuring aesthetic consistency. This flexibility allows for distinctive and unique user experiences without compromising ease of use or the integrity of design components .

Bootstrap facilitates responsive design principles through its grid system that allows for dynamic column resizing and fluid layouts that adjust to different screen sizes automatically. Media queries are integrated to enable custom styles at various viewport widths, ensuring seamless adaptation to devices ranging from mobile phones to desktops. Bootstrap's built-in classes provide a framework for hiding, showing, or rearranging content based on the user's device context, making it straightforward to implement responsive design without extensive custom CSS .

Bootstrap's JavaScript plugins significantly enhance web applications' interactivity through components like modals, tooltips, and carousels. These plugins are designed to be easily implementable and customizable, adhering to Bootstrap's overarching goal of standardization and efficiency. Their plug-and-play nature allows developers to effortlessly add dynamic features without reinventing the wheel, thus streamlining the process of creating interactive and user-friendly applications. These plugins use a straightforward API and support programmative usage, complementing the broader Bootstrap framework by providing seamless transitions and behaviors across components .

Bootstrap's forms offer both default and extended controls that ensure consistency in design while catering to varied input requirements. The default controls include basic input fields, radio buttons, and checkboxes that provide a consistent look across applications. Extended controls offer enhanced functionalities like input groups, custom selects, and more complex elements, allowing developers to meet specific input needs without sacrificing the cohesive visual design of the application .

Bootstrap's grid system includes features like the default grid system, fluid grid system, and responsive design components which collectively enable developers to create adaptable layouts. The default grid system utilizes a set number of columns that can be rearranged using the classes for basic grid HTML, offsetting, and nesting columns, which facilitates placing and aligning content efficiently. The fluid grid adapts to dynamic layouts, and the use of ‘container’ layouts and media queries helps in making the designs responsive to various screen sizes .

You might also like