Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
jQuery Bootstrap is not just another CSS framework. jQuery Bootstrap is a framework that will change the way you use CSS.
For the quickest and easiest start, just copy this snippet into your webpage.
Download, fork, pull, file issues, and more with the jQuery Bootstrap repo on Github.
jQuery Bootstrap combines the power of Twitter Bootstrap and the jQuery UI into a single CSS boilerplate with easy to learn consistent semantics, offering both highly atomic functionality and more advanced layout options with a minimal amount of code. With jQuery Bootstrap, you can keep your CSS both clean and readable and stick to the same consistent standards for all of your CSS code.
Bootstrap is tested and supported in major modern browsers like Chrome, Safari, Internet Explorer, and Firefox.
The default grid system provided as part of Bootstrap is a 940px wide 16-column grid. It’s a flavor of the popular 960 grid system, but without the additional margin/padding on the left and right sides.
As shown here, a basic layout can be created with two "columns," each spanning a number of the 16 foundational columns we defined as part of our grid system. See the examples below for more variations.
<div class="row"> <div class="span6"> ... </div> <div class="span10"> ... </div> </div>
Nest your content if you must by creating a .row
within an existing column.
<div class="row"> <div class="span12"> Level 1 of column <div class="row"> <div class="span6"> Level 2 </div> <div class="span6"> Level 2 </div> </div> </div> </div>
The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div.container>
.
<body> <div class="container"> ... </div> </body>
An alternative, flexible fluid page structure with min- and max-widths and a left-hand sidebar. Great for apps and docs.
<body> <div class="container-fluid"> <div class="sidebar"> ... </div> <div class="content"> ... </div> </div> </body>
A standard typographic hierarchy for structuring your webpages.
The entire typographic grid is based on two Less variables in our preboot.less file: @basefont
and @baseline
. The first is the base font-size used throughout and the second is the base line-height.
We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Using emphasis, addresses, & abbreviations
<strong>
<em>
<address>
<abbr>
Emphasis tags (<strong>
and <em>
) should be used to indicate additional importance or emphasis of a word or phrase relative to its surrounding copy. Use <strong>
for importance and <em>
for stress emphasis.
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.
Note: It's still okay to use <b>
and <i>
tags in HTML5 and they don't have to be styled bold and italic, respectively (although if there is a more semantic element, use it). <b>
is meant to highlight words or phrases without conveying additional importance, while <i>
is mostly for voice, technical terms, etc.
The <address>
element is used for contact information for its nearest ancestor, or the entire body of work. Here are two examples of how it could be used:
Note: Each line in an <address>
must end with a line-break (<br />
) or be wrapped in a block-level tag (e.g., <p>
) to properly structure the content.
For abbreviations and acronyms, use the <abbr>
tag (<acronym>
is deprecated in HTML5). Put the shorthand form within the tag and set a title for the complete name.
<blockquote>
<p>
<small>
To include a blockquote, wrap <blockquote>
around <p>
and <small>
tags. Use the <small>
element to cite your source and you'll get an em dash —
before it.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.
Dr. Julius Hibbert
<blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p> <small>Dr. Julius Hibbert</small> </blockquote>
<ul>
<ul.unstyled>
<ol>
dl
<code>
<pre>
Pimp your code in style with two simple tags. For even more awesomeness through javascript, drop in Google's code prettify library and you're set.
Code, blocks of or just snippets inline, can be displayed with style just by wrapping in the right tag. For blocks of code spanning multiple lines, use the <pre>
element. For inline code, use the <code>
element.
Element | Result |
---|---|
<code> |
In a line of text like this, your wrapped code will look like this >html< element. |
<pre> |
<div> <h1>Heading</h1> <p>Something right here...</p> </div> Note: Be sure to keep code within |
<pre class="prettyprint"> |
Using the google-code-prettify library, your blocks of code get a slightly different visual style and automatic syntax highlighting. <div> <h1>Heading</h1> <p>Something right here...</p> </div> Download google-code-prettify and view the readme for how to use. |
<span class="label">
Call attention to or flag any phrase in your body text.
Ever needed one of those fancy New! or Important flags when writing code? Well, now you have them. Here's what's included by default:
Label | Result |
---|---|
<span class="label">Default</span>
|
Default |
<span class="label success">New</span>
|
New |
<span class="label warning">Warning</span>
|
Warning |
<span class="label important">Important</span>
|
Important |
<span class="label notice">Notice</span>
|
Notice |
Display thumbnails of varying sizes on pages with a low HTML footprint and minimal styles.
Thumbnails in the .media-grid
can be any size, but they work best when mapped directly to the built-in Bootstrap grid system. Image widths like 90, 210, and 330 combine with a few pixels of padding to equal the .span2
, .span4
, and .span6
column sizes.
Media grids are easy to use and rather simple on the markup side. Their dimensions are purely based on the size of the images included.
<ul class="media-grid"> <li> <a href="#"> <img class="thumbnail" src="http://placehold.it/330x230" alt=""> </a> </li> <li> <a href="#"> <img class="thumbnail" src="http://placehold.it/330x230" alt=""> </a> </li> </ul>
<table>
<thead>
<tbody>
<tr>
<th>
<td>
<colspan>
<caption>
Tables are great—for a lot of things. Great tables, however, need a bit of markup love to be useful, scalable, and readable (at the code level). Here are a few tips to help.
Always wrap your column headers in a <thead>
such that hierarchy is <thead>
> <tr>
> <th>
.
Similar to the column headers, all your table’s body content should be wrapped in a <tbody>
so your hierarchy is <tbody>
> <tr>
> <td>
.
All tables will be automatically styled with only the essential borders to ensure readability and maintain structure. No need to add extra classes or attributes.
# | First Name | Last Name | Language |
---|---|---|---|
1 | Some | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
<table> ... </table>
Get a little fancy with your tables by adding zebra-striping—just add the .ui-table-striped
class.
# | First Name | Last Name | Language |
---|---|---|---|
1 | Some | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
Note: Zebra-striping is a progressive enhancement not available for older browsers like IE8 and below.
<table class="ui-table-striped"> ... </table>
Taking the previous example, we improve the usefulness of our tables by providing sorting functionality via jQuery and the Tablesorter plugin. Click any column’s header to change the sort.
# |
First Name |
Last Name |
Language |
---|---|---|---|
1 | Your | One | English |
2 | Joe | Sixpack | English |
3 | Stu | Dent | Code |
<script src="js/jquery/jquery.tablesorter.js"></script> <script > $(function() { $("table#sortTableExample").tablesorter({ sortList: [[1,0]] }); }); </script> <table class="ui-table-striped"> ... </table>
All forms are given default styles to present them in a readable and scalable way. Styles are provided for text inputs, select lists, textareas, radio buttons and checkboxes, and buttons.
Add .form-stacked
to your form’s HTML and you’ll have labels on top of their fields instead of to their left. This works great if your forms are short or you have two columns of inputs for heavier forms.
As a convention, buttons are used for actions while links are used for objects. For instance, "Download" could be a button and "recent activity" could be a link.
All buttons default to a light gray style, but a number of functional classes can be applied for different color styles. These classes include a ui-color-blue .ui-priority-primary
class, a light-ui-color-blue .ui-state-info
class, a ui-color-green .ui-state-success
class, and a ui-color-red .ui-state-error
class. Plus, rolling your own styles is easy peasy.
Button styles can be applied to anything with the .ui-button
applied. Typically you’ll want to apply these to only <a>
, <button>
, and select <input>
elements. Here’s how it looks:
Fancy larger or smaller buttons? Have at it!
For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s .disabled
for links and :disabled
for <button>
elements.
div.ui-message
One-line messages for highlighting the failure, possible failure, or success of an action. Particularly useful for forms.
div.ui-message.ui-message-block
For messages that require a bit of explanation, we have paragraph style alerts. These are perfect for bubbling up longer ui-state-error messages, ui-state-highlight a user of a pending action, or just presenting ui-state-information for more emphasis on the page.
Modals—dialogs or lightboxes—are great for contextual actions in situations where it’s important that the background context be maintained.
One fine body…
Twipsies are super useful for aiding a confused user and pointing them in the right direction.
Lorem ipsum dolar sit amet illo ui-state-error ipsum veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. Voluptasdicta eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt sed dicta quae accusantium fugit voluptas nemo voluptas voluptatem rem quae aut veritatis quasi quae.
Use popovers to provide subtextual ui-state-information to a page without affecting layout.
Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Check the link below for how to use jQuery Bootstrap with jQuery UI.
jQuery UI is the official jQuery user interface library. It provides interactions, widgets, effects, and theming for creating Rich Internet Applications.
jQuery UI provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets, built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.